|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-08-03 14:28 UTC] andy@php.net
[2001-08-03 14:32 UTC] andy@php.net
[2001-08-03 14:32 UTC] boyzone_2001 at yahoo dot com
[2001-08-03 14:34 UTC] boyzone_2001 at yahoo dot com
[2001-08-03 14:48 UTC] andy@php.net
[2001-08-03 14:49 UTC] andy@php.net
[2001-08-04 02:44 UTC] boyzone_2001 at yahoo dot com
[2001-08-06 17:14 UTC] andy@php.net
[2001-08-06 17:21 UTC] andy@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 05:00:02 2025 UTC |
ok here is my probelm. generally in php.ini settings register_globals are ON. now anyway i want to have them OFF. a quick search through manual found me a function which can change it that is ini_set. it requires the directive and the value for it to be passed and it would be changed. but even though i change the register_globals it doesnt have any effect. below is my code. PHP:-------------------------------------------------------------------------------- <?php $setting = ini_get('register_globals'); print "Current setting of register_globals is $setting<br>"; $check = ini_set('register_globals','0'); // i have tried putting 0,'0', off,'off' but all to no avail. if(! $check) { print "Can not change setting.<br>"; exit; } $new_setting = ini_get('register_globals'); print "New setting of register_globals is $new_setting<br>"; print "Now let us check if it worked. Make sure u have called script with fundoo parameter.<br>e.g. :: script.php?fundoo=something, <br>it would be printed again.<br>"; print "Fundoo is $fundoo"; ?> -------------------------------------------------------------------------------- i have tried to put up every possible value that i can assume but still it doesnt work. i have tested this on my win machine it doesnt work. and on linux machine too, on which it doesnt work either. u can check script here. http://www.jdk.f2s.com/drms/admin.php?fundoo=something so the point is that its not possible to change register_globals using ini_set. its not working. though it works with .htaccess so i would like u to change wat i mentioned in documentation. u can change the description in manual regarding ini_set function which says that register_globals can be changed everywhere by specifying PHP_INI_ALL . it should be PHP_INI_PERDIR|PHP_INI_SYSTEM thats it, jd