system() call in PHP5 on win2003

system() call in PHP5 on win2003

am 10.07.2007 04:38:39 von Xiaogang

We used to use php 4 on our web server on win2000, and use the system()
to call some DOS programs. That how we call it:

$cmd = "c:\\Inetpub\\wwwroot\\test.exe";
$last_line = system($cmd, $retval);
print ("
\nretval =\"". $retval. "\"
\n");

It was working perfectly for years.

However, recently we moved to a win2003 server, and install the php
5.2.3, and now the system() no longer works as expected:

1. It no longer work in the web, the only result returned
to the web browser is "retval =-1";

2. It still works if tested in DOS commandline (use the
command such as "php test.php");

3. Even change the $cmd to "type test.txt" or "dir", the
result is the same: works in DOS prompt window, but
not web browser (received only "retval =-1").

I have checked the permissions on all those files/folders, even tried
giving read/execute permission to "everyone", still no help.

In our configuation, the safe mode is off.

Any clue? Thanks in advance.

Xiaogang

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php