I did not use cookie in my application

I know that there are new() and load() method in CGI::Session. To check
whether the session is expired, first use load() to load the existing
session and use is_expired() to check whether the session is expired. It
seems that CGI::Application::Plugin::Session only use new(), a new session
will be created automatically when there is no session before or the session
is expired.

Regards,
Anthony
 
-----Original Message-----
From: Cees Hek [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 26, 2006 7:59 PM
To: Anthony Chee
Cc: List - CGI-Application
Subject: Re: [cgiapp] Checking expired session in cgiapp_prerun stage

On 4/26/06, Anthony Chee <[EMAIL PROTECTED]> wrote:
> I would like to check whether the session expired in cgiapp_prerun 
> stage, but got some problem
>
> The condition is that the application will not go to mode "page6"
> (showSessionExpire) after I logged in the system and idle for more 
> than 1 min, it just run into "page1", ie, conition 
> $self->session->is_new() met, and new session is generated. I checked 
> that CGI-Application-Plugin-Session manual page and found "This 
> effectively creates a singleton session object for the duration of the 
> request. CGI::Session will look for a cookie or param containing the 
> session ID, and create a new session if none is found.". Does it mean 
> that expired session will not be loaded, and create a new session instead?

Most likely, the cookie is being expired on the client, and is not being
sent to the server.  Which means CGI::Session can not know that a session
was expired, because it is not given a session ID.  You should try and set
the cookie expiry time to be later than the session expiry time.

Cheers,

Cees

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.6/324 - Release Date: 25/04/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.6/324 - Release Date: 25/04/2006
 


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to