|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24009 FCGX_Finish_r() isn't called if no SCRIPT_FILENAME is provided
Submitted: 2003-06-04 02:30 UTC Modified: 2003-06-29 15:10 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: jan at kneschke dot de Assigned: shane (profile)
Status: Closed Package: CGI/CLI related
PHP Version: 4CVS-2003-06-04 (stable) OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: jan at kneschke dot de
New email:
PHP Version: OS:


 [2003-06-04 02:30 UTC] jan at kneschke dot de
I'm using a php with the fastcgi-SAPI for my own webserver 
lighttpd. While testing various cases I've found a bug in the 
If no usefull script-filename is sent to the PHP it would send a 
default error-page with "No input file specified." and status 
404. After sending this messsage the module is shutdown 
without finishing the FastCGI request. This results in a missing 
FCGI_REQUEST_END packet and is against the FastCGI 
I don't know if the FCGX_Finished_r() should be called before 
or after module_shutdown(). Before actually works fine. 
Index: cgi_main.c 
RCS file: /repository/php4/sapi/cgi/cgi_main.c,v 
retrieving revision 
diff -u -r1.190.2.37 cgi_main.c 
--- cgi_main.c  31 May 2003 17:02:01 -0000 
+++ cgi_main.c  4 Jun 2003 07:19:12 -0000 
@@ -1487,6 +1487,9 @@ 
                        SG(sapi_headers).http_response_code = 404; 
                        PUTS("No input file specified.\n"); 
                        php_request_shutdown((void *) 0); 
+#ifdef PHP_FASTCGI 
+                       if (fastcgi) FCGX_Finish_r(&request); 
                        return FAILURE; 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-06 07:20 UTC]
Shane, you should know this? :)

 [2003-06-29 15:10 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Mar 26 06:03:39 2023 UTC