Problem with exec

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nelluru
    New Member
    • Mar 2007
    • 31

    Problem with exec

    Hi,

    I am using PHP 5.2.5 and IIS 5.1 on Windows XP SP3 machine. I am trying to execute an exe by using exec or system command.
    When I run this php script from the command line it works fine without any problem.
    When I try to run the script from IE7 the exe is crashing,
    sample code:
    Code:
    <?php
    exec("C:\\temp\\uudecode.exe c:\\temp\\test.txt");//or
    system("cmd.exe /c C:\\temp\\uudecode.exe c:\\temp\\test.txt");
    ?>
    I got that uuencode code from uuencode.

    What will be the reason for crashing???

    If everything works well I have to put this on window 2003 server.
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Nelluru.

    If the executable is crashing, it sounds like a problem with the executable, not with your PHP script.

    Do you get any error message or debug output?

    Comment

    • Nelluru
      New Member
      • Mar 2007
      • 31

      #3
      Originally posted by pbmods
      Heya, Nelluru.

      If the executable is crashing, it sounds like a problem with the executable, not with your PHP script.

      Do you get any error message or debug output?
      If there is any problem with the exe it should crash while running the php script in command line.
      What is the difference in executing a script in command line and in browser???

      I get the error message.

      Comment

      Working...