|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-05-04 16:07 UTC] sterling at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 19:00:01 2025 UTC |
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.