Overriding configuration variables with standalone PHP
| From: | Sameh Ghane | Date: | Mon, 17 Jun 2002 13:23:55 +0000 |
| Subject: | Overriding configuration variables with standalone PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-102502@lists.php.net to get a copy of this message | ||
Hi,
I use PHP 4.1.2 built as standalone, so I cannot use .htaccess' PHP4 directives
feature, like « php_flag register_globals Off ».
I tried to use a different php.ini file, and stick to it with php's -c option:
-c <path> Look for php.ini file in this directory
Which led me to this .htaccess file:
Action php-script /common-cgi/php -c /usr/local/etc/php.standalone.maddy
Unfortunately, apache's syntax does not allow arguments to be sent to the
cgi-script.
Anyway, php binary does not allow command-line arguments when used as a CGI.
Is there a way to specify configuration variables during the script, like with
set_magic_quotes_runtime() ? My aim goal is to deactivate register_globals in
this particular directory, but it could be any php directive.
I believe there is a way to do that, beside having to build a specific php
binary (with a different config file path for each) everytime I want to override
a directive.
Cheers,
--
Sameh