|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-17 08:21 UTC] terrafrost at gmail dot com
[2004-10-21 23:18 UTC] wez@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 01:00:01 2025 UTC |
Description: ------------ When run from a webserver, the following two scripts cause the webserver to crash. In contrast, no such problem occurs when these scripts are run from the command line. Reproduce code: --------------- ptest.php: <? $p1 = popen("c:\\php\\php -q hello.php","r"); $p2 = popen("c:\\php\\php -q hello.php","r"); while (!feof($p1)) print fgets($p1); while (!feof($p2)) print fgets($p2); pclose($p1); pclose($p2); ?> and hello.php: <? print "hello,\nworld!\n"; ?> Expected result: ---------------- I expect the following to be displayed: hello, world! hello, world! Actual result: -------------- When run from the command line, the expected result is the actual result. However, when run from a webserver (I tried Apache 2.0.52 and Abyss Web Server 1.2.3.0) they create a bunch of php and cmd processes (more than it should) and none of them are terminated. In the case of Apache, processes are no longer created after the first 10 or so are. Afterwards, trying to view php scripts, with Apache, causes an Internal Server Error. In the case of Abyss, processes are no longer created when the system has run out of ram.