[cgiapp] the plugin CGI::Application::Plugin::Session issue
Mike.G
hylinux at gmail.com
Tue Jun 10 21:09:03 EDT 2008
Hi, Cees, I got it. thanks very much.
I had remove the cookie parameter named "secure", it work find now.
so, I am not very clean know what's that parameter. look like I need find
some document about the cookie setting.
and thank a lot.
Mike.G
2008/6/11 Cees Hek <ceeshek at gmail.com>:
> On Tue, Jun 10, 2008 at 5:31 PM, Mike. G <hylinux at gmail.com> wrote:
> > Hi, list
> > I got one issue when I use the plugin CGI::Application::Plugin::Session
> >
> **SNIP**
> >
> > COOKIE_PARAMS => {
> > -domain => $this->cfg('site_domain'),
> > -expires=>'+40m',
> > -path=>'/',
> > -secure=>1,
> > },
> >
> > );
> >
> **SNIP**
> >
> > *when I refresh that script, we always got the difference session id,
> why?*
>
> Hi Mike,
>
> That is usually due to a cookie problem. Make sure the cookie is
> actually being set in the browser, and that it is being returned back
> to on the next request. The Live HTTP Headers plugin for firefox is
> really handy for this.
>
> If the cookie isn't being set, then I would remove some of the cookie
> options that you have set above. Start without any cookie options and
> then start adding them in until you find the problem.
>
> There is another problem that can sometimes cause this. CGI::Session
> sometimes has issues flushing the session to the database unless it is
> done explicitly. I believe the main cause of this is the database
> handle going away before CGI::Session has a chance to flush it to the
> database. Adding a call to flush the session in the teardown stage
> usually solves that. Just add the following to your base class:
>
> __PACKAGE__->add_callback('teardown', sub {
> my $self = shift;
> $self->session->flush;
> });
>
>
> Cheers,
>
> Cees
>
> ##### CGI::Application community mailing list ################
> ## ##
> ## To unsubscribe, or change your message delivery options, ##
> ## visit: http://lists.openlib.org/mailman/listinfo/cgiapp ##
> ## ##
> ## Web archive: http://lists.openlib.org/pipermail/cgiapp/ ##
> ## Wiki: http://cgiapp.erlbaum.net/ ##
> ## ##
> ################################################################
>
>
More information about the cgiapp
mailing list