Problem with exec and backticks on Win NT

From: Date: Fri, 07 Jul 2000 09:55:34 +0000
Subject: Problem with exec and backticks on Win NT
Groups: php.windows 
Request: Send a blank email to php-windows+get-930@lists.php.net to get a copy of this message
I've been trying to call a Win NT executable from a PHP4 script and the result is very strange. The browser hangs, and when I look in Task Manager the application is shown as running, but doesn't do anything. e.g. To investigate this I created a small executable test.exe, which just displays a message box. In the PHP script I have: $cmd = "c:\test\test.exe"; exec( $cmd ); // it's the same is I do $cmd. It's the same if I use forward slashes in the $cmd. c:\test\test.exe runs fine from the command line. Task manager shows test.exe as a running process, but the message box does not appear. If I end the process, the rest of the script executes normally. If I use a DOS shell command, like dir, in place of the test.exe, it doesn't hang. If I use a simple batch file in place of the test.exe it does what it should. If I put a call to test.exe inside the batch file, it hangs again, just like before. Is there a problem with Windows executables? Have I missed something stupid, or is this a bug? All help appreciated. Phil

« previous php.windows (#930) next »