php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39634 session variable and normal variable
Submitted: 2006-11-26 10:47 UTC Modified: 2006-11-27 10:09 UTC
From: erhanbaris at gmail dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.2.0 OS: Win Xp SP1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: erhanbaris at gmail dot com
New email:
PHP Version: OS:

 

 [2006-11-26 10:47 UTC] erhanbaris at gmail dot com
Description:
------------
when i was use $_SESSION variable i find interesting thing.
look at this.

Reproduce code:
---------------
<?
session_start();
$_SESSION['id']=2006;
header('Location: second.php');
?>
second.php
<?
session_start();
$id=1985;
echo "\$_SESSION['id'] -> ".$_SESSION['id']."<br>\n";
echo "\$id -> ".$id."<br>\n";
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-26 16:38 UTC] iliaa@php.net
Is you register_globals enabled or not?
 [2006-11-26 16:44 UTC] erhanbaris at gmail dot com
yes. register_globals is enabled.
 [2006-11-27 10:09 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 [2011-07-14 03:43 UTC] info at foziasoft dot com
i m facing the same problem .you can check this with the example below

   session_start();
   $_SESSION['price']=100;
   echo 'SESSION price value before-->'.$_SESSION['price'];  //100
   $price = 154;
   echo 'SESSION price value  After-->'.$_SESSION['price'];  //154
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 14:01:33 2025 UTC