ID: 44994 Comment by: aliks0905 at gmail dot com Reported By: dbarrett at vistaprint dot com Status: Assigned Bug Type: Program Execution Operating System: win32 only - 2003 Server, 64-bit PHP Version: 5.2.6 Assigned To: pajoye New Comment:
I have the same issue as well. I use the exec() function to simultaneously upload files and sometimes cmd.exe freezes and all following uploads fail. I run on a Windows 2003 Server using Apache 2.2.11 and PHP 5.2.9 Looking forward to hearing a solution. Previous Comments: ------------------------------------------------------------------------ [2009-02-27 18:58:20] alex at alexi dot ch Hi all, I can fully confirm the above behaviour on the Windows platform. We are using Apache FOP to create PDF-Files out of PHP, so we are invoking exec() to start the command line FOP processor. With several versions of PHP 5.2.x (5.2.4, 5.2.6, 5.2.8), this problem occurs soon as more than one user is invoking the exec(). Luckily we could not reproduce this behaviour using PHP 5.1.x, so downgrading to a 5.1.x version might also be an option for you. Regards alex ------------------------------------------------------------------------ [2009-01-16 17:17:44] schreiber at cs-itc dot de Same problems on w2k3 server x64 SP2 with apache 2.2.8 + 2.2.11 and php 5.2.0 up to 5.2.8 -> using exec() the shellproc cmd.exe hangs and httpd is blocked for further ops, can just be cured by restart of apache services. Workaround with COM object helps, but thats no lucky solution... ------------------------------------------------------------------------ [2009-01-13 18:44:15] irdev at rogers dot com I have been experiencing this issue as well. The server is Windows 2003 with all patches up to date running IIS. PHP version is 5.2.5. I am running a commandline process using exec(). I have also tried passthru and shell_exec with the same results. Problem is intermittent and can not be replicated on demand. The processes themselves can not be killed until the IIS worker process is killed first although they do complete all the work they are supposed to. The commands do not die on script timeout. ------------------------------------------------------------------------ [2008-12-02 14:34:25] brem at martinbreton dot com If that's any help, I'm using a COM object as a workaround for this bug, and while it makes this bug appear less frequently, it still happens, randomly, from time to time. Here's what i did as a workaround using the exec() function call: $WshShell = new COM("WScript.Shell"); $OutputFile = "C:\\Temp\\output.txt"; $Command = "cmd /C MyApp.exe > $OutputFile"; $WshShell->Run( $Command, 0, true ); file_get_contents( $OutputFile ) ); unlink( $OutputFile ); ------------------------------------------------------------------------ [2008-11-18 08:46:34] bernd dot ebert at gmx dot net Same Problem here with an commandline-script calling other php-commandline-scripts. It seems to happen more frequently if you have a lot of exec-calls. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44994 -- Edit this bug report at http://bugs.php.net/?id=44994&edit=1