php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39223 $_Session and $_Get get confused
Submitted: 2006-10-21 20:58 UTC Modified: 2006-10-21 21:50 UTC
From: dgk at visskiss dot org Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.1.6 OS: Fedora
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: dgk at visskiss dot org
New email:
PHP Version: OS:

 

 [2006-10-21 20:58 UTC] dgk at visskiss dot org
Description:
------------
I am getting session variables with the same value as the 
$_GET variables... please advise

Reproduce code:
---------------
session_start();
$sesuid= $_SESSION['uid'];


//check for the _get
if (isset( $_GET['mid'])) {
	$uid = $_GET['mid'];
} else if (isset( $_GET['uid'])) {
	$uid = $_GET['uid'];
} else {
	echo '<p class="error">You have reached this page in error (no model selected).</p>';
}
$_SESSION['uid']=$sesuid;

Expected result:
----------------
$_GET['uid'] get's the value of $_SES['uid']

Actual result:
--------------
neither $_GET nore $_SES['uid'] should change

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-21 21:31 UTC] tony2001@php.net
Disable register_globals.
 [2006-10-21 21:50 UTC] dgk at visskiss dot org
please see bug report 39225
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 07 12:01:35 2025 UTC