rabbitism
08-12-2009, 02:43 PM
Problem: The function isset is returning false on a $_SESSION variable that is set.
Two simple test files:
1) sessionstart.php
<?php
session_start();
$_SESSION['timeout'] = 88888888;
?>
2) sessiontest.php
<?php
session_start();
resin_var_dump($_SESSION);
if (isset($_SESSION['timeout'])) {
echo 'session timeout is set!';
} else {
echo 'session timeout is not set!';
}
?>
In the above, I hit the sessionstart.php, and then hit sessiontest.php in the browser manually. I always get 'session timeout is not set'.
The resin_dump_var of $_SESSION returns:
array(1) {
["timeout"]=>
int(88888888)
}
Why would isset function return false? Is this a bug?
Two simple test files:
1) sessionstart.php
<?php
session_start();
$_SESSION['timeout'] = 88888888;
?>
2) sessiontest.php
<?php
session_start();
resin_var_dump($_SESSION);
if (isset($_SESSION['timeout'])) {
echo 'session timeout is set!';
} else {
echo 'session timeout is not set!';
}
?>
In the above, I hit the sessionstart.php, and then hit sessiontest.php in the browser manually. I always get 'session timeout is not set'.
The resin_dump_var of $_SESSION returns:
array(1) {
["timeout"]=>
int(88888888)
}
Why would isset function return false? Is this a bug?