[cgiapp] Sessions leaking with FastCGI

Victor Bruno vicdamone at gmail.com
Mon Jul 25 20:34:00 EDT 2011


Turned out to be an old CGI version! After banging my head for weeks and
months, turns out the fix was: "cpan -i CGI"  Thought I'd update the thread
for anyone else who encounters it.

This has been a vanilla CGI app for years, and the very intermittent,
occasional, leaking sessions started after a move to fastcgi 6 months ago.

Found this in the change logs for CGI that mentions the fix:

Version 3.44, Jul 30, 2009

...

  3. Fixed issue in mod_perl & fastCGI environment of cookies returned from

     CGI->cookie() leaking from one session to another.

I was using 3.42
$ perl -MCGI -e "print \$CGI::VERSION;"
3.15

On Sun, Jun 26, 2011 at 11:53 AM, Victor Bruno <vicdamone at gmail.com> wrote:

> I was going off of the CAP-Session documentation:
>
> "...
> The recommended place to call session_config is in the cgiapp_init stage of
> CGI::Application. If this method is called after the session object has
> already been accessed, then it will die with an error message.
> ..."
>
> My app appears to work with session_config under cgiapp_prerun.  I will
> give
> that a try.
>
> Thanks!
>
> -----Original Message-----
> From: cgiapp-bounces at lists.openlib.org
> [mailto:cgiapp-bounces at lists.openlib.org] On Behalf Of dave at skiddlydee.com
> Sent: Sunday, June 19, 2011 2:01 AM
> To: CGI Application
> Subject: Re: [cgiapp] Sessions leaking with FastCGI
>
> "Victor Bruno" <vicdamone at gmail.com> writes:
>
> > I am going to try moving my session_config call to prerun from init,
> since
> > init does not get called on every page request with FastCGI.
>
> I'd guess that's your bug and solution right there. And you'd have that
> same problem in any persistent environment.
>
> - dave
>
>
> #####  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