|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19878 exec() function failed to execute win32 EXE programs
Submitted: 2002-10-12 00:22 UTC Modified: 2002-10-12 02:22 UTC
From: datung84 at hotmail dot com Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.2.3 OS: Windows 2000 Adv. Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
30 - 23 = ?
Subscribe to this entry?

 [2002-10-12 00:22 UTC] datung84 at hotmail dot 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.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-12 02:22 UTC]
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 as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.
 [2002-10-16 20:00 UTC] tekno at shadowfox dot homelinux dot org
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.

	$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"
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Mar 31 02:03:37 2023 UTC