#24167 [Csd->Opn]: [PATCH] FastCGI server processes dying when script not found
ID: 24167
User updated by: mweilguni at sime dot com
Reported By: mweilguni at sime dot com
-Status: Closed
+Status: Open
Bug Type: CGI related
Operating System: Redhat Linux 7.2
PHP Version: 4.3.2
Assigned To: shane
New Comment:
The bug is not really fixed. The request now works (I get "No input
file specified"), but the affected server process still terminates and
after 8 such requests alle servers are gone. What's the reason to
terminate the request if no input file was found?
Previous Comments:
------------------------------------------------------------------------
[2003-06-29 18:16:36] sniper@php.net
Fixed. See bug #24009.
------------------------------------------------------------------------
[2003-06-29 15:07:16] shane@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.
Thank you for your interest in PHP.
this is a dup of 24009, patch being submitted shortly
------------------------------------------------------------------------
[2003-06-18 10:29:45] iliaa@php.net
Try this patch http://bb.prohost.org/fcgi.txt and let
me know if it
fixes the problem.
------------------------------------------------------------------------
[2003-06-13 07:46:40] sniper@php.net
Shane should know? :)
------------------------------------------------------------------------
[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
Thread (8 messages)