On 6/14/06, Michael Petnuch <[EMAIL PROTECTED]> wrote:
I am having a problem using CGI::Application::Plugin::Authentication
under mod_perl (I am using CGI::Application::Dispatch). For some
reason the Session object does not get created when I use mod_perl.
The problem disappears if I run it under normal cgi. Is there
something that needs to be changed if I am using mod_perl? I am not
really versed with it (this is the first app I was using mod_perl with)?
Usually that occurs when the session object does not go out of scope
at the end of the request, and hence it is never flushed. You never
notice this in a plain CGI script, because the perl interpreter ends
at the end of the request, so obviously, every object is destroyed,
and the session will be flushed automatically. Under mod_perl the
interpreter sticks around, so if you have a copy of the session object
hanging around somewhere that is not destroyed at the end of the
request, then the automatic flush never happens.
Try adding this to your code to see if that solves the problem:
sub teardown {
my $self = shift;
$self->session->flush;
}
That is assuming you are using the Session plugin. If you roll your
own Session code, it may have to change a bit.
Cheers,
Cees
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]