Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
"(and at this point I'm doubting that will ever surface)."
Oh, ye of little faith. :-P Here's the code for the 'initialize_session' method that's called from the 'cgiapp_init' method of the 'Base.pm' module that's inherited from 'CGI::Application': sub initialize_session { my $self = shift; my $q = $self->query(); my $session = CGI::Session->new('driver:File', $q->cookie('CGISESSID') || $q->param('CGISESSID') || undef, { Directory=>'/ctrlacc/lhdsurv/session/mid_yr_rpt_survey' } ) or die($CGI::Session::errstr); # 05-17-2005: See if following code works # expire the session itself after 1 idle hour $session->expire('+1h'); #Initialize the session and get the id. my $sessionid = $session->id(); $self->param('sessionid'=>$sessionid); $self->param('session'=>$session); if ( (! defined($q->cookie('CGISESSID'))) or ($sessionid ne $q->cookie('CGISESSID')) ) { # If the session has expired, reset the cookie $self->header_add(-cookie => $q->cookie(-name => 'CGISESSID', value => $sessionid, -path=>'/') ); } } In reply to Re^4: having problems w/CGI-Session
by aroc725
|
|