Hi,
I have some problems with reading my saved sessionvariables. It has worked very fine for over 1 ½ year until it just ended working last week. Nothing has changed, no code was rewritten, no changes och the webserver nothing. But now it seems like the variables just has been lost. I can always get the sessionID, but the variables that I register on the first page has disappeared on the next page. Here is an example of the code.
1 page: session1.php
<?php
session_start();
print session_id();
echo "<br><br>";
$test_var = "This is the variable!";
echo $test_var;
session_register("test_var");
echo "<head><META HTTP-EQUIV='Refresh' CONTENT='1;url=session2.php'></head><body>";
?>
2 page: session2.php
<?php
session_start();
print session_id();
echo "<br><br>";
if (session_is_registered("test_var")) {
echo $test_var;
}
else {
echo "The variable is lost!!";
}
?>
I hope that there is anyone who can help me with this strange problem. It is PHP 4.04 and it is running at a "Red Hat Linux release 6.2" with Apache as a webserver.
Thanks in advance!
/Magnus