Bug #54636 [Opn->NoF]: "no input file specified" when using specific RewriteRule

From: Date: Sun, 29 Mar 2015 23:01:29 +0000
Subject: Bug #54636 [Opn->NoF]: "no input file specified" when using specific RewriteRule
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191699@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54636&edit=1 ID: 54636 Updated by: kalle@php.net Reported by: me at paw-e-l dot net Summary: "no input file specified" when using specific RewriteRule -Status: Open +Status: No Feedback Type: Bug Package: CGI/CLI related Operating System: Any PHP Version: 5.3SVN-2011-04-29 (SVN) Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2014-07-16 02:38:08] yohgaki@php.net Current master does not include your patch. Do you still have this issue with 5.4 or up? ------------------------------------------------------------------------ [2011-12-16 10:25:53] me at paw-e-l dot net Yes, thats what people advise on framework forums. I'am hoping for some official fix in cgi_main.c ------------------------------------------------------------------------ [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

« previous php.bugs (#191699) next »