#40964 [NEW]: Variable lost data using session
| From: | joao at paintbox dot com dot br | Date: | Fri, 30 Mar 2007 21:57:57 +0000 |
| Subject: | #40964 [NEW]: Variable lost data using session | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-110973@lists.php.net to get a copy of this message | ||
From: joao at paintbox dot com dot br
Operating system: Windows 2003 / IIS 6
PHP version: 5.2.1
PHP Bug Type: Session related
Bug description: Variable lost data using session
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.
--
Edit bug report at http://bugs.php.net/?id=40964&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40964&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40964&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40964&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40964&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40964&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40964&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40964&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40964&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40964&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40964&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40964&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40964&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40964&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40964&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40964&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40964&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40964&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40964&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40964&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40964&r=mysqlcfg