note 85920 rejected from function.exec by danbrown
| From: | danbrown@php.net | Date: | Wed, 24 Sep 2008 17:13:48 +0000 |
| Subject: | note 85920 rejected from function.exec by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-144679@lists.php.net to get a copy of this message | ||
Note Submitter: philippe dot hajjar at montgomerycollege dot edu
----
I am having trouble using the PHP exec command to execute a batch file that I create in code. The
batch file calls a shell script that runs a command in Cygwin. This setup works fine on a
development environment running Windows XP SP2, IIS 5.1, and PHP 5.2.3.
The same command fails and returns no output on a Windows Server 2003 server running IIS6 and the
same version of PHP. On this server, I have:
1. Granted execute permissions to the Internet User on c:\windows\system32\cmd.exe.
2. Granted Everyone->Full Control to the directory in which the batch file is written.
3. Granted Everyone->Full Control on the entire c:\cygwin\bin directory and its contents.
4. Granted the Internet User "log on as batch" permissions.
5. Specified the full path to each file being executed.
6. Tested these scripts running from the command line on the server and they work just fine.
7. Ensured that %systemroot%\system32 is in the system path.
I am pretty sure that covers it. Does anyone else have any suggestions?
Thanks!