php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: danielc at analysisandsolutions dot com
New email:
PHP Version: OS:

 

 [2009-03-11 19:37 UTC] danielc at analysisandsolutions dot com
Description:
------------
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 : 5.3.0.0
    szModName : php5ts.dll
    szModVer : 5.3.0.0
    offset : 000cea5d

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

    C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\WERc9f6.dir00\php-cgi.exe.mdmp
    C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\WERc9f6.dir00\appcompat.txt

My Apache 1.3 error log message shows:
[Wed Mar 11 14:59:02 2009] [error] [client 127.0.0.1] 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)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-18 15:53 UTC] garretts@php.net
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] stas@php.net
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] pajoye@php.net
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] svn@php.net
Automatic comment from SVN on behalf of stas
Revision: http://svn.php.net/viewvc/?view=revision&revision=289621
Log: fix crash for bug #47627
 [2009-10-15 21:32 UTC] svn@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289687
Log: - Merge: fix crash for bug #47627
 [2009-10-16 23:34 UTC] svn@php.net
Automatic comment from SVN on behalf of stas
Revision: http://svn.php.net/viewvc/?view=revision&revision=289706
Log: improve fix for #49767 and #47627 - make PHP report
"no script" on 404 again
 [2009-10-19 17:04 UTC] svn@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=289757
Log: - Merge: improve fix for #49767 and #47627 - make PHP report 'no script' on 404 again
 [2010-03-29 00:16 UTC] danielc@php.net
-Status: Bogus +Status: Duplicate -Assigned To: garretts +Assigned To:
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC