On Sun, 7 Jul 2002, Greg Donald wrote:
> This code doesn't work:
> 
> <?
> if(ini_set("register_globals", "0"))
>   echo "ini_set success";
> else
>   echo "ini_set failed";
> ?>

Please don't say "this code doesn't work." Say why you think it didn't 
work, whether that's because you received an error message, or a specific 
expected outcome was not realized, or whatever. Otherwise it doesn't 
really tell us anything. Obviously it doesn't work or you wouldn't be 
posting it.

> At http://php.net/ini_set it states the following setting is possible:
> 
> register_globals "0" PHP_INI_ALL
> 
> Translated, PHP_INI_ALL means: Entry can be set anywhere
> 
> So does anyone know why my code doesn't work then?  ini_set() seems 
> broken.  Can anyone confirm or deny?

I believe the issue here is that by the time your PHP code starts
executing and gets to the ini_set call, it's too late to register the
globals (which must happen before execution begins). Therefore I'd suggest
looking into .htaccess or whatever the IIS equivalent is. If there's no
equivalent then I'd suggest throwing the server out the window.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to