ID: 26758
Comment by: pmoor at netpeople dot ch
Reported By: tcarter at noggin dot com dot au
Status: Open
Bug Type: CGI related
Operating System: Linux
PHP Version: 5.0.0b3 (beta3)
New Comment:
seems to be related/the same as bug #26101.
the supplied patch worked for me.
Previous Comments:
------------------------------------------------------------------------
[2003-12-31 20:50:36] tcarter at noggin dot com dot au
Description:
------------
When launched from mod_fastcgi as a dynamic application
the FastCGI binary exits with status 255 without serving
any requests. The problem is present in the latest CVS,
but not present in v4.3.4. The problem does not occur
when running the FastCGI binary with a bindpath (-b)
option.
The problem seems to be that
php_handle_aborted_connection() is called from the parent
process in sapi_cgi_bin_flush() and zend_bailout() then
exits because there is no bailout address set.
Webserver is:
Apache 2.0.47 (Fedora Core 1)
mod_fastcgi 2.4.2
PHP Configuration is just:
./configure --enable-fastcgi
The following seems to fix the problem, but I'm not sure
it is the right way to fix it:
--- cgi_main.c.bak 2004-01-01 12:38:22.000000000
+1100
+++ cgi_main.c 2004-01-01 12:39:34.000000000 +1100
@@ -271,7 +271,7 @@
#if PHP_FASTCGI
if (!FCGX_IsCGI()) {
FCGX_Request *request = (FCGX_Request
*)server_context;
- if(!request || FCGX_FFlush( request->out )
== -1 ) {
+ if( !parent && (!request ||
FCGX_FFlush( request->out ) == -1) ) {
php_handle_aborted_connection();
}
return;
Expected result:
----------------
PHP should serve requests and not exit immediately
Actual result:
--------------
[Thu Jan 01 12:22:54 2004] [warn] FastCGI: scheduled the
start of the last (dynamic) server
"/var/www/fastcgi-bin/php-5" process: reached
dynamicMaxClassProcs (1)
[Thu Jan 01 12:22:54 2004] [warn] FastCGI: (dynamic)
server "/var/www/fastcgi-bin/php-5" started (pid 17770)
[Thu Jan 01 12:22:54 2004] [warn] FastCGI: (dynamic)
server "/var/www/fastcgi-bin/php-5" (pid 17770) terminated
by calling exit with status '255'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26758&edit=1