php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22069 $_GET==$_SESSION
Submitted: 2003-02-05 06:54 UTC Modified: 2003-02-05 08:18 UTC
From: me at paodj dot net Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.0 OS: Win XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: me at paodj dot net
New email:
PHP Version: OS:

 

 [2003-02-05 06:54 UTC] me at paodj dot net
<?
session_start();
$_GET["username"]="admin";
$_SESSION["username"]="paodj";

echo $_GET["username"]; //Return "admin"
echo $_SESSION["username"]; //Return "admin", not "paodj"
?>

Php 4.3.0 RC 2, Apache 2, XP with register.globals = ON
if register.globals = OFF, it's ok.

My english is not very well ;)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-05 07:14 UTC] me at paodj dot net
My ver of php is 4.3.0 RC 3, not RC 2
 [2003-02-05 07:47 UTC] nicos@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Yes, when globals are on, $_GET $_POST $_FILES $_SESSION $_COOKIE are the same global variable.
 [2003-02-05 08:18 UTC] sniper@php.net
Too old PHP version..and DON'T abuse the super globals
like that, you're not supposed to add your own entries
in any other but the $_SESSION array!

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 18:01:32 2025 UTC