php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28343 PHP 4.3.6 / Apache 2.0.49 (worker) / FastCGI: Starts lots of PHP-CGIs
Submitted: 2004-05-10 08:38 UTC Modified: 2004-07-06 01:49 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: webmaster at whocares dot de Assigned:
Status: Closed Package: CGI/CLI related
PHP Version: 4.3.6 OS: SuSE Linux 9.0
Private report: No CVE-ID: None
 [2004-05-10 08:38 UTC] webmaster at whocares dot de
Description:
------------
As stated in the summary, I'm running PHP in FastCGI 
mode with Apache 2.0.49 and mod_fastcgi 2.4.2. After 
upgrading from PHP 4.3.5 to PHP 4.3.6 I noticed that a 
lot more PHP CGIs were running on the server. Before it 
were 10, afterwards it were 79. It seems to me that 
instead of starting the specified amount of PHP CGIs per 
active Apache server (5, see code below) with PHP 4.3.6 
it will start the specified number of CGI provcesses for 
every instance (child process) of the Apache server.

Compile settings for PHP 4.3.5 and 4.3.6:

./configure \
        --disable-ipv6 \
        --enable-calendar \
        --enable-ftp \
        --enable-force-cgi-redirect \
        --enable-magic-quotes \
        --enable-mbstring \
        --enable-mbregex \
        --enable-memory-limit \
        --enable-mime-magic \
        --enable-sigchild \
        --with-bz2 \
        --with-config-file-path=/etc \
        --with-curl \
        --with-db4 \
        --with-freetype-dir \
        --with-gd \
        --with-gettext \
        --with-jpeg-dir \
        --with-mcrypt \
        --with-mhash \
        --with-mysql=/usr \
        --with-openssl \
        --with-png-dir \
        --with-t1lib \
        --with-tiff-dir \
        --with-xmlrpc \
        --with-zlib \
        --enable-fastcgi

Integration in Apache:

<IfModule mod_fastcgi.c>
  ScriptAlias /fcgi-bin/ /opt/apache/fcgi/
  <Location /fcgi-bin/>
     Options    ExecCGI
     SetHandler  fastcgi-script
  </Location>
  # Alias /fcgi-bin/ /opt/apache/fcgi/
  FastCgiServer /opt/apache/fcgi/php-fcgi -processes 5
  AddType application/x-httpd-php .php
  Action  application/x-httpd-php /fcgi-bin/php-fcgi
</IfModule>

The CGI version of PHP is copied to /opt/apache/fcgi 
using

cp sapi/cgi/php /opt/apache/fcgi/php-fcgi

Expected result:
----------------
With PHP 4.3.5, evaluating the running processes will 
show a reasonable small number:

linux:~/soft/php-4.3.5 # ps ax | grep php-fcgi | wc -l
      7
linux:~/soft/php-4.3.5 # ps ax | grep httpd2 | wc -l
     32
linux:~/soft/php-4.3.5 # 

Actual result:
--------------
With PHP 4.3.6 the same command shows a lot more running 
PHP CGIs:

linux:~/soft/php-4.3.6 # ps ax | grep php-fcgi | wc -l
     47
linux:~/soft/php-4.3.6 # ps ax | grep httpd2 | wc -l
     32
linux:~/soft/php-4.3.6 #


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-06 01:49 UTC] sniper@php.net
AFAICT, Sascha just fixed this in CVS, try the snapshots from http://snaps.php.net

 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jan 23 17:01:23 2021 UTC