Bug #15746 Updated: Process exec() is slow from webserver - running from shell is ok ...

From: Date: Tue, 09 Jul 2002 21:33:42 +0000
Subject: Bug #15746 Updated: Process exec() is slow from webserver - running from shell is ok ...
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13639@lists.php.net to get a copy of this message
ID: 15746 Updated by: ollie@oliverc.com Reported By: nigel@green-bean.com Status: No Feedback Bug Type: Performance problem Operating System: Windows 2000 Server PHP Version: 4.1.1 New Comment: I don't know if anyone got any further (guessing not...) but I've taken the non-stable CVS snapshot, installed it, and modified the gallery script that makes an exec call to use proc_open. Unfortunatly it doesn't make any difference. The following (mess!) is the code I've used to test the call: $descriptorspec = array( 1 => array("pipe", "w") // stdout is a pipe that the child will write to // 2 => array("file", "/tmp/error-output.txt", "a"), // stderr is a file to write to ); msg("CALLING PROC_OPEN"); $process = proc_open("cmd.exe /c $cmd", $descriptorspec, $pipes); msg("PROC OPEN DONE"); if (is_resource($process)) { msg("SUCCESS"); // $pipes now looks like this: // 0 => writeable handle connected to child stdin // 1 => readable handle connected to child stdout // Any error output will be appended to /tmp/error-output.txt while(!feof($pipes[1])) { msg("+"); echo fgets($pipes[1], 2); msg("-"); } fclose($pipes[1]); $return_value = proc_close($process); echo "RETURNED: $return_value"; } Basically my output window does nothing for about 50 seconds after printing the first + symbol before the actual output from the command starts to appear. Running the identical command in a command prompt takes less than one second to complete. I'm running WinXP (home) with Apache 1.3.26 btw (and have the same problem people have reported above obviously). Previous Comments: ------------------------------------------------------------------------ [2002-06-24 01:00:05] php-bugs@lists.php.net No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-05-23 17:01:54] derick@php.net Win 32 snapshots: snaps.php.net/win32/ You want the non-STABLE one. Derick ------------------------------------------------------------------------ [2002-05-23 16:44:06] nigel@green-bean.com Wez - I can try reproducing the issue if you can provide a pointer to a compiled PHP kit? I'm not in a position to compile the whole project. ------------------------------------------------------------------------ [2002-05-23 11:21:41] dj_TOW@gmx.net i'd really like to do that, but im pretty inexperienced coding php. a script i wrote, that utilized imagemagick for graphics conversion/thumbnailing worked just fine ! thanks for the help anyways. ------------------------------------------------------------------------ [2002-05-23 06:22:21] wez@php.net By the way: PHP doesn't do anything any different (with regards to executing files) if it is running as a module or as a cgi. Does perl have a similar issue? ------------------------------------------------------------------------ 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/15746 -- Edit this bug report at http://bugs.php.net/?id=15746&edit=1

« previous php.bugs (#13639) next »