|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-03 18:47 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 23:00:01 2025 UTC |
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.