Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^5: having problems w/CGI-Session

by MrCromeDome (Deacon)
on May 25, 2005 at 02:44 UTC ( #460216=note: print w/replies, xml ) Need Help??

in reply to Re^4: having problems w/CGI-Session
in thread having problems w/CGI-Session

Thank you, I like being mistaken in that way :)

You might want to consider using CGI::Application::Plugin::Session. All that code you have could be boiled down to the following:
use CGI::Application::Plugin::Session; my %options = ( Directory => "/ctrlacc/lhdsurv/session/mid_yr_rpt_survey" ); $self->session_config( CGI_SESSION_OPTIONS => [ undef, $self->query, \%options ], SEND_COOKIE => 1, );
and it would be more readable. I typically throw that in the cgiapp_init() method of my CGI::Application base class, but if you wanted to throw it in it's own function it's probably alright.

And I've never had any luck setting expiration times with CGI::Session. They never work for me. Either don't expire the cookie, or set it to expire as soon as the browser closes.

Good luck, I hope this helps!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2021-04-14 22:23 GMT
Find Nodes?
    Voting Booth?

    No recent polls found