#39277 [Opn]: php-cgi does not parse command line arguments when running under Apache
| From: | nisoi at mail dot ru | Date: | Tue, 31 Oct 2006 12:17:26 +0000 |
| Subject: | #39277 [Opn]: php-cgi does not parse command line arguments when running under Apache | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-104216@lists.php.net to get a copy of this message | ||
ID: 39277
User updated by: nisoi at mail dot ru
Reported By: nisoi at mail dot ru
Status: Open
Bug Type: CGI related
Operating System: FreeBsd 6.1
PHP Version: 4.4.4
New Comment:
I just tested this issue under Gentoo Linux. Same things happen: PHP
does not pay any attention to command line arguments passed to php-cgi
running under Apache.
Previous Comments:
------------------------------------------------------------------------
[2006-10-27 11:02:42] nisoi at mail dot ru
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 this bug report at http://bugs.php.net/?id=39277&edit=1