#30463 [Opn]: popen crashes webservers

From: Date: Sun, 17 Oct 2004 06:21:38 +0000
Subject: #30463 [Opn]: popen crashes webservers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-67677@lists.php.net to get a copy of this message
ID: 30463 User updated by: terrafrost at gmail dot com Reported By: terrafrost at gmail dot com Status: Open Bug Type: Reproducible crash Operating System: Windows XP PHP Version: 4.3.9 New Comment: The problem also seems to effect proc_open... Previous Comments: ------------------------------------------------------------------------ [2004-10-17 08:17:53] terrafrost at gmail dot com 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30463&edit=1

« previous php.bugs (#67677) next »