Bug #806: Running php via CGI with command-line arguments
| From: | Florian dot Xhumari at inria dot fr | Date: | Thu, 01 Oct 1998 15:58:29 +0000 |
| Subject: | Bug #806: Running php via CGI with command-line arguments | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1583@lists.php.net to get a copy of this message | ||
From: Florian.Xhumari@inria.fr
Operating system:
PHP version: 3.0.4
PHP Bug Type: Feature/Change Request
Bug description: Running php via CGI with command-line arguments
I have set up a CGI script (written in sh) which calls /usr/local/bin/php, and I want to give php
some command-line arguments (like for setting the ini file path). Note that the arguments passed to
the CGI script do not get passed to php, so there is no security problem.
Currently php does not process command-line arguments if invoked as/by/through a CGI script.
A simple patch that I did:
In main.c, when checking:
if (!cgi) ....
for processing arguments, replace with:
if (!cgi || getenv("PHP_PROCESS_ARGS")) ...
In this way, I can set the PHP_PROCESS_ARGS environment variable in my script that calls php, and
then call php with the right arguments.
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net