ini_set() cannot be used to handle register_globals or register_argc_argv,
because by the time this function gets called - it's already 'too late' for
doing these tasks. You have to use a method of setting these directives
before the script even begins to execute, via php.ini, httpd.conf or .htaccess.
At 10:49 19/07/2001, J. Jones wrote:
>I am not subscribed to this list, so please CC: or reply directly to me.
>I may be doing something wrong.. I'm not real sure. Neither $argc or $argv
>seem to be registered with the cgi version of php 4.0.6 and up.
>The test script:
>ini_set ('register_globals', 1);
>ini_set ('register_argc_argv', 1);
>exits with the following:
>Warning: Undefined variable: argc in ./foo.php on line 5
>Warning: Undefined variable: argv in ./foo.php on line 6
>regardless of any command line options passed to it.
>Older scripts that work fine with php 4.0.5 fail with 4.0.6, with identical
>build options and php.ini settings. The above script also behaves as expected
>on php 4.0.5.
>Any ideas? Am I missing something? Does this work for other people?
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
Zeev Suraski <[EMAIL PROTECTED]>
CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]