From: nisoi at mail dot ru Operating system: FreeBsd 6.1 PHP version: 4.4.4 PHP Bug Type: CGI related Bug description: php-cgi does not parse command line arguments when running under Apache
Description: ------------ PHP-4.4.4-cgi does not parse command line arguments when run under Apache (but parses it when run from shell). Php5 works fine in same situation. I run php-4.4.4 as cgi under Apache/1.3.34. All requests for *.php are redirected to php-cgi with Action php-script /cgi-bin/php4 /cgi-bin/php4 looks like this: === /cgi-bin/php4 ==> #!/usr/local/php4/bin/php-cgi -c/home/scrtest/www/site1/public_html/php-c.ini <== /cgi-bin/php4 === But phpinfo() says that it is using default config from /usr/local/php4/etc/php-cgi.ini. No other arguments are working: neither "-n", neither "-h", nor anything. Even this trick: === /cgi-bin/php4 ==> #!/bin/sh /usr/local/php4/bin/php-cgi -c/home/scrtest/www/site1/public_html/php-c.ini <== /cgi-bin/php4 === does not make php-cgi to take it's arguments. When I run same command from shell, php-cgi parses it's arguments correctly. Reproduce code: --------------- <?php phpinfo(); ?> Expected result: ---------------- Want to see /home/scrtest/www/site1/public_html/php-c.ini as configuration file. Actual result: -------------- See /usr/local/php4/etc/php-cgi.ini as configuration file. -- Edit bug report at http://bugs.php.net/?id=39277&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39277&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39277&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39277&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39277&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39277&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39277&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39277&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39277&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39277&r=support Expected behavior: http://bugs.php.net/fix.php?id=39277&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39277&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39277&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39277&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39277&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39277&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39277&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39277&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39277&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39277&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39277&r=mysqlcfg
