httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Merz" <>
Subject Re: mod_fcgid: Problem serving binary content with Apache 2.2.13 - PHP 5.2.9
Date Sun, 20 Sep 2009 16:30:02 GMT
Hi Jeff,

"Jeff Trawick" <> schrieb im Newsbeitrag
> On Sat, Sep 19, 2009 at 3:48 AM, Marcus Merz <> wrote:
> Recap: Try cgi.fix_pathinfo=0; maybe somebody else will chime in on the
> PHP_Fix_Pathinfo_Enable processing.

Thanks for your comments. Surprisingly setting cgi.fix_pathinfo=0 in php.ini
does not change the behaviour calling http://www.domain.tld/image.jpg . PHP
still tries to parse the jpg, same as with the default setting of
cgi.fix_pathinfo=1in php.ini. What *does* change is, that when calling
http://www.domain.tld/modify.php/image.php (for test purposes) instead of
displaying the image -which worked before with cgi.fix_pathinfo=1 (or
uncommented as 1 is default), PHP tries to parse the jpg as well:

Warning: Unexpected character in input: '' (ASCII=16) state=1 in
/srv/www/vhosts/image.jpg on line 234

Parse error: syntax error, unexpected '[' in /srv/www/vhosts/image.jpg on
line 234

I did check with phpinfo() that cgi.fix_pathinfo was 0 and 1 each time i

What is new is, that using CGI instead of mod_fcgid, with cgi.fix_pathinfo=0
the script now fails with a 'No input file specified' message in the
webbrowser. There is no error logged in error_log but a 404 is logged in
access_log for /image.jpg.

Obviously using mod_php it works regardless of setting cgi.fix_pathinfo=0 or
1 as it is not taken care of anyway and so the image gets displayed each

To recap:
setting cgi.fix_pathinfo=0 causes mod_fcgid to parse the jpg file (same
behaviour as before) using http://www.domain.tld/image.jpg *AND*

Switching back to cgi.fix_pathinfo=1 and using CGI instead of mod_fcgid, the
image gets displayed 'out-of-the-box.

I suspect there are differences in mod_fcgid.conf which default settings
cause this behaviour because the php.ini is the same for both. I will take a
closer look into the docs for 2.3.1 and trying to find a solution there.

Of course i was glad if somebody else knows the solution.


View raw message