PHP shell commands (exec, passthru and system) won't execute
| From: | Mike Graziano | Date: | Wed, 31 May 2000 15:49:46 +0000 |
| Subject: | PHP shell commands (exec, passthru and system) won't execute | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-149@lists.php.net to get a copy of this message | ||
To all,
I posted this question once before on the general PHP list; however, now
that the list has been segmented into different groups, I thought I'd try
once again.
I am a PHP newbie and am having trouble getting PHP shell commands (exec,
passthru and system) to execute. Even something as simple as
<?
system("dir c:\\");
?>
won't execute on a Webserver running NT Server 4.0 and IIS 4.0. The message
that comes back is
Warning: Unable to fork [dir c:\] in C:\Inetpub\wwwroot\mjg\test1.php on
line 2
This very same script ran on a Linux Webserver. Permissions have been set
very liberally so I don't think this is the issue. Other PHP scripts that
do not contain shell commands do execute.
One suggestion was to try either
system("command /c dir c:\\");
or
system("cmd /c dir c:\\");
Neither of these were successful and resulted in similar error.
Does any one have any ideas?
Thx in advance,
mjg ( graz@multicastisp.com ; 914-462-9084 )