php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33777 PHP fastcgi returns "No input file specified" only when it finds a valid script
Submitted: 2005-07-20 03:01 UTC Modified: 2005-07-20 09:19 UTC
From: sibaz at sibaz dot com Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 5.0.4 OS: Upgraded Suse (2.6.5-7.155.29)
Private report: No CVE-ID: None
 [2005-07-20 03:01 UTC] sibaz at sibaz dot com
Description:
------------
When accessing valid pages from Apache2 server, PHP comes back with No input file specified.  Logs show a page was correctly accessed, but with a 404 error code.  Specifying a .html file or a non-existant file, returns a valid page or a 404 error page correcty. 
I believe the problem lies in the PHP fastcgi daemon some how.  I believe I have removed all other possible problems.  

I'm confused:  I have recompiled PHP5 and Apache2 removing everything that seems unneccesary
I have PHP5 compiled using 
./configure --enable-fastcgi --prefix=/usr/local/php5 --program-suffix=-fastcgi --without-pear and running as a separate daemon using -b 127.0.0.1:8002
I have Apache2 compiled with ./configure --prefix=/usr/local/apache2
Apache2 Config portion is below

Notes:
/usr/local/apache2/fastcgi is a valid, but empty directory

I had the server working at one point, but I added a few compile options and it stopped, and I've since removed all but the basic compile options and it still dies.  

I have done a make clean before building and I have tried this from the original clean tarball sources.

I'm clueless.  I'm not used to this kind of problem under Linux.  

Reproduce code:
---------------
Apache2 Config, which I had problems figuring out.

LoadModule fastcgi_module modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
  Alias /fcgi-bin/ /usr/local/apache2/fastcgi/
  FastCGIExternalServer /usr/local/apache2/fastcgi/php-fastcgi -host 127.0.0.1:8002
  AddType application/x-httpd-fastphp .php
  Action application/x-httpd-fastphp /fcgi-bin/php-fastcgi
</IfModule>

Expected result:
----------------
Apache Works fine except for when defering requests to the PHP daemon.  

Something, Anything from the PHP daemon.  Even an error code would be nice.  If I point it at a .html file with a .php extension just containing 'Hello World' it still returns "No input file specified"

It would be handy if the php -b daemon could log some indication as to what it was doing to the console its running on.  This seems a noticable ommission for a daemon (normally -D makes a daemon single action and debug to screen).  

Actual result:
--------------
"No input file specified" on screen
127.0.0.1 - - [20/Jul/2005:00:52:42 +0100] "GET /test.php HTTP/1.1" 404 25
in the access.log



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-20 03:36 UTC] sibaz at sibaz dot com
I've just compiled a fresh version of Apache 1.3.33 with mod_fastcgi as an APACI module and attempted to use the same running PHP5 daemon, with identical results.  I hope this at least elliminates Apache from the problem (if not mod_fastcgi)
 [2005-07-20 03:53 UTC] sibaz at sibaz dot com
I removed the php.ini file I was using and it seems to have sorted the problem.  
In testing I had the same problem using /usr/local/apache2/htdocs and /home/sites as DocumentRoot and <Virtual> DocumentRoot respectively.  
I'm guessing there is still a bug somewhere, but I can't figure it out.  offending-php.ini is availiable at :-
http://linuxnotes.sibaz.com/offending-php.ini
 [2005-07-20 09:19 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 23 03:01:28 2024 UTC