Bug #17081: $_GET != $HTTP_GET_VARS

From: Date: Tue, 07 May 2002 19:58:11 +0000
Subject: Bug #17081: $_GET != $HTTP_GET_VARS
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-7173@lists.php.net to get a copy of this message
From: adam@mobile.net.pl Operating system: RH 7.2 PHP version: 4.2.0 PHP Bug Type: Scripting Engine problem Bug description: $_GET != $HTTP_GET_VARS There is a problem with $_GET and $HTTP_GET_VARS. In documentation, in Predefined Variables is mentioned: "$HTTP_GET_VARS contains the same information, but is not an autoglobal." That's true only in one condition - when we are talking about REAL variables passed by GET. But when we set one variable explicity in $HTTP_GET_VARS it is doesn't set in $_GET and vice versa, ie: $HTTP_GET_VARS["sthnew"] = "some str"; echo $_GET["sthnew"]; // There is no such index And: $_GET["sthnew"] = "some str"; echo $HTTP_GET_VARS["sthnew"]; // There is no such index but !! $HTTP_SESSION_VARS["sthnew"] = "some str"; echo $_SESSION["sthnew"]; // Everything is OK I know that _GET and HTTP_GET_VARS shouldn't be set explicity, but I'm doing sth like URL coding and decoding to hide variables from being watched by users and I'm coding also session id. After decoding I write session sid in HTTP_GET_VARS and call session_start(). But session_start() use _only_ $_GET array, not $HTTP_GET_VARS and of course sessions doesn't work. I think you should change documentation or change this feature :) When I read: "$HTTP_GET_VARS contains the same information..." it means for me THE SAME ALL THE TIME... If it doesn't it is very confusing :( Especially that $_SESSION and $HTTP_SESSION_VARS contains the same information all the time. Adam -- Edit bug report at http://bugs.php.net/?id=17081&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17081&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17081&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17081&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17081&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17081&r=support Expected behavior: http://bugs.php.net/fix.php?id=17081&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17081&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17081&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17081&r=globals

« previous php.bugs (#7173) next »