php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40964 Variable lost data using session
Submitted: 2007-03-30 21:57 UTC Modified: 2007-04-03 18:47 UTC
From: joao at paintbox dot com dot br Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.2.1 OS: Windows 2003 / IIS 6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joao at paintbox dot com dot br
New email:
PHP Version: OS:

 

 [2007-03-30 21:57 UTC] joao at paintbox dot com dot br
Description:
------------
I have 2 websites one of them are running in a Linux server with Apache and got NO PROBLEM... the other one is running in a Windows 2003 with IIS 6 and I have a problem. After change a page the values of session variables are lost.

I wrote a simple test script but I didn't find a solution, I read lots of articles along the internet but dind't find a solution:

teste_Sessao.php
<?
session_start();

$idsession = session_id();

$_SESSION['usracesso'] = 123; 
$usracesso2 = 456;
session_register('usracesso2'); // note that I try both ways to register
$usr = $_SESSION['usracesso'];

echo "SessionID: ".$idsession."<br>";
echo "User: ".$usr."<br>";
echo "User2: ".$usracesso2."<br>";

// making a link to the other page
echo "<a href=teste_sessao2.php?PHPSESSID=".$idsession.">teste_sessao2.php?PHPSESSID=".$idsession."</a>";
?>

teste_sessao2.php
<?
session_start();

$idsession = session_id();

$usr = $_SESSION['usracesso'];
$usr2 = $_SESSION['usracesso2'];

echo "SessionID: ".$idsession."<br>";
echo "User: ".$usr."<br>";
echo "User2: ".$usr2."<br>";
?>

I have no problem to get SessionID value but the others variables (usr and usr2) lost their values.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-03 18:47 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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 05:01:30 2024 UTC