Bug #54636 [NEW]: "no input file specified" when using specific RewriteRule
| From: | me at paw-e-l dot net | Date: | Fri, 29 Apr 2011 19:00:07 +0000 |
| Subject: | Bug #54636 [NEW]: "no input file specified" when using specific RewriteRule | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-160456@lists.php.net to get a copy of this message | ||
From:
Operating system: Any
PHP version: 5.3SVN-2011-04-29 (SVN)
Package: CGI related
Bug Type: Bug
Bug description:"no input file specified" when using specific RewriteRule
Description:
------------
Hello,
apache 2 + mod_rewrite + mod_fcgid + php-cgi
blank page with "no input file specified" shows when trying to access url
like this:
http://somesite.net/test
with .htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
above sample address is rewrited to (i've checked mod_rewrite log to be
sure):
http://somesite.net/index.php/test
and php shows "no input file specified".
however when i try to access directly http://somesite.net/index.php/test
everything works fine.
with my colleague we've fixed this issue by editing 2 lines in:
sapi/cgi/cgi_main.c
here is our working version (based on 306939 revision of cgi_main.c):
http://paw-e-l.net/cgi_main.c
keep in mind that our "fix" was made just to get it work, so it may break
something else ;)
Test script:
---------------
<?
phpinfo();
Expected result:
----------------
see result of phpinfo() function
Actual result:
--------------
blank page with "no input file specified"
--
Edit bug report at http://bugs.php.net/bug.php?id=54636&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54636&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54636&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54636&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54636&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54636&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54636&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54636&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54636&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54636&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54636&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54636&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54636&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54636&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54636&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54636&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54636&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54636&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54636&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54636&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54636&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54636&r=mysqlcfg