From: tcarter at noggin dot com dot au Operating system: Linux PHP version: 5.0.0b3 (beta3) PHP Bug Type: CGI related Bug description: FastCGI exits immediately with status 255
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 bug report at http://bugs.php.net/?id=26758&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26758&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26758&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26758&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26758&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26758&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26758&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26758&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26758&r=support Expected behavior: http://bugs.php.net/fix.php?id=26758&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26758&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26758&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26758&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26758&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26758&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26758&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26758&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26758&r=float