php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38857 when env variable GATEWAY_INTERFACE is set php returns No input file specified.
Submitted: 2006-09-16 23:21 UTC Modified: 2006-09-17 12:30 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: christian dot korff at gmail dot com Assigned:
Status: Wont fix Package: CGI/CLI related
PHP Version: 5.1.6 OS: Gentoo Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
48 - 46 = ?
Subscribe to this entry?

 
 [2006-09-16 23:21 UTC] christian dot korff at gmail dot com
Description:
------------
PHP has somehow trouble with the GATEWAY_INTERFACE.
I'm using Gentoo's dev-lang/php-5.1.6-r4 package. (Gentoo provides build specs called ebuilds. With these ebuilds portage builds and install the packages)
PHP 5.1.6-pl4-gentoo with Hardening-Patch 0.4.15 (cgi-fcgi) (built: Sep 16 2006 21:56:04)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

Reproduce code:
---------------
1) take a php script
2) run php-cgi -n -f foobar.php
3) now set the env variable GATEWAY_INTERFACE and run
4) php-cgi -n -f foobar.php again

Expected result:
----------------
PHP should always output HTTP headers with the cgi sapi. When called this GATEWAY_INTERFACE env variable set php behaves right about http headers. However it ends up with No input file specified.

Actual result:
--------------
On the first one PHP does output html code when phpinfo() is called but no http header things are printed.
On the second one PHP does http headers:
Status: 404
X-Powered-By: PHP/5.1.6-pl4-gentoo with Hardening-Patch
Content-type: text/html

No input file specified.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-17 00:40 UTC] christian dot korff at gmail dot com
same seems to apply for REQUEST_METHOD
 [2006-09-17 08:08 UTC] tony2001@php.net
Expected result.
When those variables are declared, SCRIPT_FILENAME and PATH_TRANSLATED are required too.
 [2006-09-17 12:21 UTC] christian dot korff at gmail dot com
ah, I understood. However this isn't a bogus as the error mesage is only for those who know that it means.

A more informative error message would be better for admins and developers. I personally run a thttpd webserver on my local machine for testing (just because I didn't set up the big apache yet) and it seems that thttpd (thttpd/2.25b 29dec2003) doesn't set these required env.
 [2006-09-17 12:30 UTC] tony2001@php.net
You won't get this error message if you don't mess with CGI-related environment variables, which you should not do in the first place.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 06:01:28 2024 UTC