|Just another Perl shrine|
modperl PerlAuthenHandler script persistenceby SirBones (Friar)
|on Mar 28, 2006 at 19:55 UTC||Need Help??|
SirBones has asked for the
wisdom of the Perl Monks concerning the following question:
Hello Monks; I beg your pardon for this, because it seems I should be able to find the answer somewhere, and it may not be a pure Perl question. But after 2 days of google searches and banging my head on my desk all I have is a dented desk (and a headache.) I'm the first to admit I don't really understand Apache/modperl/data persistence very well, so bear with this fool for a bit...
I have a user authentication script (PerlAuthenHandler) which stores a time value for each authenticated user in a hash. Every time the script runs it updates the value, checks it, etc. Basically if a user has authenticated recently I don't force another check (the underlying authentication is via LDAP.) I want this hash to be persistent across calls to the handler (of course.)
Under Apache 1.3 with an early modperl version this works fine. But now I'm bringing up a new server with Apache 2 and modperl 2, I've set up the httpd.conf and perl.conf file directives the same way, and I can't get it to work. Under Apache 2 the script appears to not be persistent; the hash gets reinitialized with every authentication call.
It's been a while since I set up my old 1.3 server, but I don't recall doing anything special other than installing modperl and setting up the appropriate apache directives. I certainly had to make a lot of changes to my authentication script to get it running under Apache/modperl 2, and it works fine except for this lack of persistence. Is there some configuration value controlling this behavior whose default has changed between Apache or modperl versions?
Here are the relevant entries in my Apache configuration files; they are unremarkable. I include them for completeness. They are identical (except for the name of the modperl module) on both servers.
Thanks, in advance, muchly. I know this spills over to non-Perl issues as well, but hopefully I'm not too off topic.
"This bounty hunter is my kind of scum: Fearless and inventive." --J.T. Hutt