From:             dsimic99 at gmail dot com
Operating system: Linux
PHP version:      5.2.1
PHP Bug Type:     CGI related
Bug description:  PHP 5.2.1 -- FastCGI wrapper script echoed back

Description:
------------
I'm setting up an Apache2 (2.0.59) server with PHP4 (4.4.6) and PHP5
(5.2.1) support, both are compiled as FastCGI's (mod_fastcgi-2.4.2), using
Suexec.

Here's an excerpt from httpd.conf (server config context):

FastCgiWrapper /usr/local/apache2/bin/suexec
SuexecUserGroup www www

Action php4-fcgi /php/4
Action php5-fcgi /php/5

AddHandler php4-fcgi .php .php4 .php3
AddHandler php5-fcgi .php5

Alias /php/4 "/htdocs/.fcgi/php4-cgi"
Alias /php/5 "/htdocs/.pcgi/php5-cgi"

<LocationMatch "^/php/[45]/.*$">
    Options ExecCGI
    SetHandler fastcgi-script
    Order Allow,Deny
    Allow from All
</LocationMatch>

<LocationMatch "^/php/[45]/(php[45]-cgi)?$">
    Options None
    Order Allow,Deny
    Deny from All
</LocationMatch>

/htdocs/.fcgi/php4-cgi and /htdocs/.fcgi/php5-cgi are simple shell scripts
("wrappers"), here's php5-cgi (php4-cgi is almost the same):

#!/bin/sh
export PHPRC=/usr/local/php-cgi/etc/php5
export PHP_FCGI_CHILDREN=4
export PHP_FCGI_MAX_REQUESTS=1000
exec /usr/local/php-cgi/bin/php5-cgi

Everything runs great, but when I point my browser to
http://server.domain.tld/php/5/random-garbage , I get the wrapper script
echoed back in the browser, minus the shebang line.  Pointing the browser
to http://server.domain.tld/php/4/random-garbage results in "No input file
specified.", what's perfectly Ok.

Why (and how?) is the PHP5 performing like that?


-- 
Edit bug report at http://bugs.php.net/?id=41120&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41120&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41120&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41120&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41120&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=41120&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41120&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41120&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41120&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41120&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41120&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=41120&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=41120&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41120&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41120&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41120&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41120&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41120&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41120&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41120&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41120&r=mysqlcfg

Reply via email to