[Catalyst] Session unexpectedly expiring
James R. Leu
jleu at mindspring.com
Mon May 21 17:28:36 GMT 2007
Not really related to your issue specifically, but I have seen
issues with using Session::Store::FastMmap and perl ithreads resulting
in unrelated sessions appearing to terminate when a thread 'joins'
back to the parent. I think is has something to do with ithreads
interaction with shared memory. My fix was to not use shared memory :-)
On Mon, May 21, 2007 at 08:52:16AM -0700, Jeff Chimene wrote:
> Jeff Chimene wrote:
> > Hi,
> >
> > I'm trying to figure out why my sessions are expiring in
> > script/xxx_cgi.pl but not script/xxx_server.pl
> > The desired cycle is to login then redirect to another controller.
> >
> > When I run the standalone server, the session state is recovered, and
> > control resumes with the next controller.
> >
> > When I run using Apache & the script/xxx_cgi.pl, the session state is
> > marked expired and control returns to the login controller.
> >
> > I'm using the Session, Session::Store::FastMmap, Session::State::Cookie
> > plugins.
> >
> > Thanks for your support!
> >
> > Cheers,
> > jec
> This has something to do w/ the implementation of the "auto" method in
> Root.pm
>
> There's some "extra" stuff I added to support returning to the requested
> URI after
> login. Nevertheless, it works from script/aic_server.pl, but not from
> Apache.
>
> Anyway, I disabled the routine and received goodness from Apache.
>
> sub auto : Private
> {
> my ($self, $c) = @_;
>
> if ($c->controller eq $c->controller('Login')) {
> return 1;
> }
>
> # If a user doesn't exist, force login
> $c->session->{after_login} = '';
> if (!$c->user_exists) {
> $c->log->debug('***Root::auto User not found, forwarding to
> /login') if $c->debug;
>
> # make sure we return here after a successful login
> $c->session->{after_login} = $c->request->uri() unless
> ($c->request->uri() eq $c->request->base());
> $c->detach('aic::Controller::Login', 'index');
> }
>
> # User found, so return 1 to continue with processing after this 'auto'
> return 1;
> }
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
--
James R. Leu
jleu at mindspring.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070521/6a66d714/attachment.pgp
More information about the Catalyst
mailing list