[cgiapp] cgi::application::plugin:session: only one session id per instance under fcgi?

Nathan Jahnke njahnke at gmail.com
Thu Apr 16 14:41:59 EDT 2009


hi all,

first off, great framework.

but i'm having some trouble with cgi::app::plugin::session under fcgi.
i'm only getting one session id per application instance (since
session_config() has to be called in cgiapp_init() i guess?). this
effectively means that all clients have the same session id.

lighttpd 1.4.x config is as follows:

##
server.modules += ( "mod_fastcgi" )
fastcgi.server = ( ".pl" => ((
                 "bin-path"        => "/var/www/censored.pl",
                 "socket"          => "/tmp/perl.socket",
                 "check-local"     => "disable",
                 "min-procs"       => 2,
                 "max-procs"       => 5,
                 "idle-timeout"    => 20
 )))
##

censored.pl is like this:

#!/usr/bin/perl -w
use strict;
use warnings;
use censored;

my $webapp = censored->new;
$webapp->run();
##

i've replicated this with a barebones censored.pm (default values for
session_config() etc). of course i use:

##
use base qw(CGI::Application::FastCGI);
##

... in censored.pm.

session management works as expected running the identical application
under vanilla cgi.

am i missing something? is there a canonical way to run cgi::apps in
an fcgi environment?

thanks in advance


nathan


More information about the cgiapp mailing list