|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14997 Multiple system calls cause inifinite process forking
Submitted: 2002-01-11 10:42 UTC Modified: 2002-08-14 18:50 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: marcus at names dot co dot uk Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 4.1.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: marcus at names dot co dot uk
New email:
PHP Version: OS:


 [2002-01-11 10:42 UTC] marcus at names dot co dot uk
If PHP is running via a web server, and mutiple system 
calls are made within the script to another script, 
hundreds of processes are created. Here is an example:

Script 1:
for ($i=1; $i<=5; $i++) {
    system("php script2.php");

Script 2:

The effect is the same (and more difficult to stop) when 
the system calls are made in the background. e.g.

system("php script2.php >>/dev/null 2>>/dev/null &");

I have even tried calling a shell script, which in turn 
calls the second PHP script (both in the background), but 
it still causes lots of processes.

The "exec" command is also affected.

At first, I thought this was a problem with either Zeus web 
server of Fast CGI, but I have since tried it with Apache 
and normal CGI with the same effect.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-11 10:48 UTC]
are you talking about 'defunct' (aka zombie)
 [2002-01-14 06:28 UTC] marcus at names dot co dot uk
There are zombie processes, but there are also many valid 
processes. Do you know a fix?
 [2002-01-18 10:55 UTC] marcus at names dot co dot uk
Does anyone have any thoughts on this? If not, I'm going to 
have to go back to Perl, which I haven't used for years!

 [2002-08-14 18:50 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

I've tried your code in PHP 4.3.0-dev and it seems to work fine. Without any 'left over' or zombie process'
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 08:01:23 2020 UTC