From: mweilguni at sime dot com Operating system: Redhat Linux 7.2 PHP version: 4.3.2 PHP Bug Type: CGI related Bug description: FastCGI server processes dying when script not found
Description: ------------ We use PHP 4.3.2 + FastCGI + Apache/mod_fcgi. The PHP fastcgi server is started in our setup with 8 preforked php-servers, so after a restart the process tree will look like: \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 so far it's ok. when I request for a non-existant script, I get the error "No input file specified.". That's ok too. But after that, one server process died: \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 | \_ /usr/bin/php-fcgi-4.3.2 After requesting a non-existant script 8 times all servers are gone, only the master server process remains: \_ /usr/bin/php-fcgi-4.3.2 I checked the file sapi/cgi/cgi_main.c and it seems the error is in line 1473: if (retval == FAILURE && file_handle.handle.fp == NULL) { SG(sapi_headers).http_response_code = 404; PUTS("No input file specified.\n"); php_request_shutdown((void *) 0); php_module_shutdown(TSRMLS_C); return FAILURE; } IMO this should be: if (retval == FAILURE && file_handle.handle.fp == NULL) { SG(sapi_headers).http_response_code = 404; PUTS("No input file specified.\n"); #if PHP_FASTCGI continue; #endif php_request_shutdown((void *) 0); php_module_shutdown(TSRMLS_C); return FAILURE; } It seems to work fine, but I'm not really sure if this is right. -- Edit bug report at http://bugs.php.net/?id=24167&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24167&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24167&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24167&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24167&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24167&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24167&r=support Expected behavior: http://bugs.php.net/fix.php?id=24167&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24167&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24167&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24167&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24167&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24167&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24167&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24167&r=gnused