The session loads fine for the most part but it is randomly clearing all of the data some times and I don't know why:
Create my new session:
$session = CGI::Session->new( "driver:file",undef,{Directory => '/tmp'} );
$session->param('logged_in', 1);
$session->expire('logged_in', '+10m');
$session->expire('+1h');
Now when I go to another page and load the session I do:
$session = CGI::Session->load ( "driver:file", $sid, {Directory => '/tmp'} );
return 0 if $session->is_expired;
return 0 if !$session->param('logged_in');
return $session;
The problem I have is that sometimes, before the 10 minute mark is up the 'logged_in' param is empty when it should not be. Why could this be happening?