|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47627 "No input file specified" causing crash
Submitted: 2009-03-11 19:37 UTC Modified: 2010-03-29 00:16 UTC
From: danielc at analysisandsolutions dot com Assigned:
Status: Duplicate Package: CGI/CLI related
PHP Version: 5.3CVS-2009-03-11 (snap) OS: win32 only - WinXP Pro SP3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: danielc at analysisandsolutions dot com
New email:
PHP Version: OS:


 [2009-03-11 19:37 UTC] danielc at analysisandsolutions dot com
In PHP 5.3, pointing my browser to a .php file that does not exist causes php-cgi to crash and Apache to return a 500 error.  In PHP 5.2.6, doing so returns output saying "No input file specified."

During the crash, Windows displays the "Please tell Microsoft about this problem" dialog box.  The title is "CGI / FastCGI".  The "To see what data this error report contains" sub dialog box says:

    Error signature
    szAppName : php-cgi.exe
    szAppVer :
    szModName : php5ts.dll
    szModVer :
    offset : 000cea5d

The "To view technical information about the error report" sub sub dialog box contains:


My Apache 1.3 error log message shows:
[Wed Mar 11 14:59:02 2009] [error] [client] Premature end of script headers: c:/program files/php/php-cgi.exe

My PHP version is:
PHP 5.3.0beta2-dev (cgi-fcgi) (built: Mar 11 2009 17:04:23)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-18 15:53 UTC]
I'm unable to reproduce this with Apache 2.2.13, mod_fcgid and php5.3.1-dev.

I'd recommend a couple of things: 
- Since Apache 1.3 isn't really supported at all these days, moving up to 2.2 would be a good idea.

- Regardless, Apache should be configured to not pass thru requests to fcgi handlers for files that don't exist.
 [2009-10-13 19:45 UTC]
I can reproduce it. IIS gives empty path_translated (NULL) when file not found which crashes here:

UpdateIniFromRegistry(primary_file->filename TSRMLS_CC);

in php_execute_script since primary_file->filename is NULL.
 [2009-10-13 19:50 UTC]
That's correct and has been analyzed in #49767, will be fixed there.

Please note that the condition is not only that the file does not exist but also to use when the per directory registry setting is used.

Set this one as bogus as the one will be used to track this bug.

Thanks for having reproduced it Stas :)
 [2009-10-13 19:59 UTC]
Automatic comment from SVN on behalf of stas
Log: fix crash for bug #47627
 [2009-10-15 21:32 UTC]
Automatic comment from SVN on behalf of pajoye
Log: - Merge: fix crash for bug #47627
 [2009-10-16 23:34 UTC]
Automatic comment from SVN on behalf of stas
Log: improve fix for #49767 and #47627 - make PHP report
"no script" on 404 again
 [2009-10-19 17:04 UTC]
Automatic comment from SVN on behalf of pajoye
Log: - Merge: improve fix for #49767 and #47627 - make PHP report 'no script' on 404 again
 [2010-03-29 00:16 UTC]
-Status: Bogus +Status: Duplicate -Assigned To: garretts +Assigned To:
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Dec 07 18:01:29 2023 UTC