|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-03-25 12:19 UTC] holliwell at gmx dot net
Description: ------------ Hi, http://de2.php.net/manual/en/ini.core.php#ini.register-globals says register_globals is changeable PHP_INI_PERDIR. However the faq entry about "Emulating Register Globals" http://de2.php.net/manual/en/faq.misc.php#faq.misc.registerglobals uses statements like: ini_set('register_globals', true); and ini_set('register_globals', false); The purpose of this statements isn't really clear. The usage of this ini_set statements is conflicting with the explanation of register_globals in the manual and where and how this setting can be changed. Kind regards Friedhelm PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 11:00:01 2025 UTC |
Hi, The manual says very clear, that you cannot change register_globals with ini_set, because it is changeable PHP_INI_DIR: register_globals "0" PHP_INI_PERDIR PHP_INI_ALL in PHP <= 4.2.3. Conclusion: using ini_set('register_globals', 'what_ever_value') has no effect, no? Kind regards FriedhelmYou are absolutely right, sorry for the confusion. I removed the ini_set('register_globals') from FAQ.It does have some effect in regards to sessions (at least it used to, not sure since 4.2.3). And I assume the author of that FAQ put it there in case the script uses ini_get('register_globals') somewhere else in which case the script knows it's been polluted (behaving like it's on). But to avoid confusion, I also think it should be removed.I also thought that <?php ini_set("whetever", "foo"); echo ini_get("whatever"); ?> prints "foo" thus I documented why ini_set was called in FAQ first. But it's not true (at least in 4.3.10 and 5.0.3), ini_set() works only with PHP_INI_USER.