ID: 24167
Updated by: [EMAIL PROTECTED]
-Summary: FastCGI server processes dying when script not found
Reported By: mweilguni at sime dot com
-Status: Open
+Status: Assigned
Bug Type: CGI related
Operating System: Redhat Linux 7.2
PHP Version: 4.3.2
-Assigned To:
+Assigned To: shane
New Comment:
Shane should know? :)
Previous Comments:
------------------------------------------------------------------------
[2003-06-13 03:14:07] mweilguni at sime dot com
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 this bug report at http://bugs.php.net/?id=24167&edit=1