ini_set('register_globals',0) doesn't work

From: Date: Sun, 26 May 2002 19:01:45 +0000
Subject: ini_set('register_globals',0) doesn't work
Groups: php.general 
Request: Send a blank email to php-general+get-99310@lists.php.net to get a copy of this message
I tested ini_set('register_globals',0) and ini_set('register_globals','Off') for turning register_globals off. It doesn't work and it doesn't produce any notice, warning or error. Here's a quick example: <?php ini_set('register_globals',0); if(isset($test)) echo "<h2>$test</h2>"; ?> <form action="ini_set.php" method="get"> <input type="text" name="test" /> <input type="submit" /> </form> This prints out $test, what it shouldn't do with register_globals turned off. I tested this with PHP 4.1.2 and 4.2.1. Even if I start to doubt it is supposed to work according to the documentation. Can anyone tell me what I've done wrong? For some strange reason if I do echo ini_set('register_globals',0); it will print "10". For echo ini_set('register_globals','Off'); it will print "1Off". Jens PS: ini_set works fine with include_path and error_reporting

« previous php.general (#99310) next »