[pmwiki-users] Turning off register_globals using ini_set()
Jason Frisvold
xenophage0 at gmail.com
Wed Jan 3 08:33:23 CST 2007
On 1/3/07, Athan <foxx at freemail.gr> wrote:
> My new webhost provider has php5 register_globals = ON and I want to turn it
> off for pmwiki only. Unfortunately PHP5 is running as CGI threfore I cannot
> use .htaccess for this purpose.
> I've tried adding ini_set('register_globals', 0); in pmwiki's local.php.
> Unfortunately action=phpinfo still displays local register_globals as ON,
> although other php5 settings altered using ini_set() in local.php work just
> fine.
Ouch.. Why would your provider do this? I'm guessing another hosted
site needed it.. Have you tried informing them of the dangers of
register_globals?
> Did I miss something ?
Yep.. From the PHP manual :
"Please note that register_globals cannot be set at runtime
(ini_set()). Although, you can use .htaccess if your host allows it as
described above. An example .htaccess entry: php_flag register_globals
off."
You can't set this via ini_set.. It has to be htaccess or in the php.ini file..
> Thanks.
> Athan
--
Jason 'XenoPhage' Frisvold
XenoPhage0 at gmail.com
More information about the pmwiki-users
mailing list