From: webmaster at whocares dot de
Operating system: SuSE Linux 9.0
PHP version: 4.3.6
PHP Bug Type: CGI related
Bug description: PHP 4.3.6 / Apache 2.0.49 (worker) / FastCGI: Starts lots of PHP-CGIs
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 #
--
Edit bug report at http://bugs.php.net/?id=28343&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28343&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28343&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28343&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28343&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28343&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28343&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28343&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28343&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28343&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28343&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28343&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28343&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28343&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28343&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28343&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28343&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28343&r=float