#19878 [Com]: exec() function failed to execute win32 EXE programs

From: Date: Thu, 17 Oct 2002 01:00:48 +0000
Subject: #19878 [Com]: exec() function failed to execute win32 EXE programs
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-22620@lists.php.net to get a copy of this message
ID: 19878 Comment by: tekno@shadowfox.homelinux.org Reported By: datung84@hotmail.com Status: Bogus Bug Type: IIS related Operating System: Windows 2000 Adv. Server PHP Version: 4.2.3 New Comment: I've had this same thing happen to me. Using php4.0.6 running an system command works fine and will return output. As soon as I upgraded to 4.2.3 the script no longer works. I'm running win2k with PHP4.2.3 and have apache running as a local user with permission to exec and read the file. I have found that if there is more than one set of double quotes in the command it will no longer work. Also putting the command into a .bat file will allow it to be run correctly if I call the .bat file. Example: <? $cmd ="\"c:\\dialup\\rcl.exe\" -c -u \"dialup_username\" -p \"dialup_password\""; $output = $cmd; echo "Attempted: $cmd<br>"; echo "Returned: <pre>$output</pre>"; //Attempted: "c:\supersalon\ssproject\scripts\rcl.exe" -c -u "dialup_username" -p "dialup_password" //Returned: ?> Previous Comments: ------------------------------------------------------------------------ [2002-10-12 02:22:15] sniper@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. ------------------------------------------------------------------------ [2002-10-12 00:22:52] datung84@hotmail.com I seem to have a problem running the exec() function. I created a php program that when user uploads a file it will automatically open an anti-virus program and check the specific file, but the execution didn't occur at all. Nothing happened. So I was wondering if exec will ever work if you run any win32 executable programs using exec(). Pease fix the bug please please. If you can give me a solution on how to resolve such problem, please let me know. Thanks, Jon ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19878&edit=1

« previous php.bugs (#22620) next »