Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: Problems getting session management to work: is_expired seems to lie to me

by ted.byers (Scribe)
on May 06, 2013 at 23:59 UTC ( #1032418=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Problems getting session management to work: is_expired seems to lie to me
in thread Problems getting session management to work: is_expired seems to lie to me

Sorry, my mistake. I misread it. But then, why does it have an incorrect value once the session expires? All of my colleagues see the same behaviour, in that they always see the session being empty, but they never get the right value from is_expired once the session has expired.

Always, we create the sessions using:

$session = CGI::Session->new('driver:mysql',$query,{ DataSource => +'dbi:mysql:profitorius', User => 'rejbyers', Password => 'Didr39Qcab' }); $session->expire("5m");

Obviously with different DB credentials and timeout value. And we check it always with something like:

$session = CGI::Session->load('driver:mysql',$query,{ DataSource => + 'dbi:mysql:profitorius', User => 'rejbyers', Password => 'Didr39Qcab' }); my $extest = $session->is_expired;

Again, obviously, with different DB credentials. As we always add session parameters, we seem to be able to rely on the session being empty to know the session expired, but we have never been able to get a correct value from is_expired once a session has actually expired. It always returns false to us, when we use it in an actual CGI script. Why?

Thanks.

Ted


Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1032418]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2014-07-28 16:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (204 votes), past polls