Edit report at https://bugs.php.net/bug.php?id=54636&edit=1

 ID:                 54636
 Comment by:         me at paw-e-l dot net
 Reported by:        me at paw-e-l dot net
 Summary:            "no input file specified" when using specific
                     RewriteRule
 Status:             Open
 Type:               Bug
 Package:            CGI/CLI related
 Operating System:   Any
 PHP Version:        5.3SVN-2011-04-29 (SVN)
 Block user comment: N
 Private report:     N

 New Comment:

Yes, thats what people advise on framework forums.
I'am hoping for some official fix in cgi_main.c


Previous Comments:
------------------------------------------------------------------------
[2011-10-17 10:03:46] 777 dot mail dot on at gmail dot com

This problem I'm having when using CodeIgniter framework.
The problem is solved by means of a roundabout:

in .htaccess:
RewriteRule ^(.*)$ index.php?$1 [L]

in config.php of framework:
$config['uri_protocol'] = "REQUEST_URI";

------------------------------------------------------------------------
[2011-04-29 21:00:06] me at paw-e-l dot net

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 this bug report at https://bugs.php.net/bug.php?id=54636&edit=1

Reply via email to