#32453 [Opn->Csd]: Confusing faq about emulating register_globals

From: Date: Thu, 31 Mar 2005 14:19:39 +0000
Subject: #32453 [Opn->Csd]: Confusing faq about emulating register_globals
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969367187@lists.php.net to get a copy of this message
ID: 32453 Updated by: vrana@php.net Reported By: holliwell at gmx dot net -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: n/a PHP Version: Irrelevant Previous Comments: ------------------------------------------------------------------------ [2005-03-25 17:13:29] vrana@php.net 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. ------------------------------------------------------------------------ [2005-03-25 17:07:21] philip@php.net 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. ------------------------------------------------------------------------ [2005-03-25 15:07:27] vrana@php.net You are absolutely right, sorry for the confusion. I removed the ini_set('register_globals') from FAQ. ------------------------------------------------------------------------ [2005-03-25 13:54:08] holliwell at gmx dot net 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 Friedhelm ------------------------------------------------------------------------ [2005-03-25 13:42:26] vrana@php.net This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. It's for telling the rest of the script that globals are (not) registered (if tested with ini_get). ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/32453 -- Edit this bug report at http://bugs.php.net/?id=32453&edit=1

« previous php.doc (#969367187) next »