Bug #17081 Updated: $_GET != $HTTP_GET_VARS

From: Date: Fri, 17 May 2002 17:33:13 +0000
Subject: Bug #17081 Updated: $_GET != $HTTP_GET_VARS
References: 1  Groups: php.bugs php.doc 
Request: Send a blank email to php-bugs+get-7945@lists.php.net to get a copy of this message
ID: 17081 Updated by: tom@php.net Reported By: adam@mobile.net.pl -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: RH 7.2 PHP Version: 4.2.0 New Comment: This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-05-07 17:10:04] derick@php.net This is not really a bug, making this a documentation issue. Derick ------------------------------------------------------------------------ [2002-05-07 15:58:11] adam@mobile.net.pl 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 this bug report at http://bugs.php.net/?id=17081&edit=1

« previous php.bugs (#7945) next »