Hi,

I've recently started using Embperl/mod_perl developing a front-end to a
database system and for a while everything seemed to be working really
well, however, now I'm stuck because the session management fails for
either one part of the program or another depending on how I configure
things.

Originally I didn't do any special session configuration, I just started
using Embperl's %udat with what appeared to be success: most of the time
my session data was there and seemed to work fine.  I realise now that
this was probably to do with the way mod_perl handles things and not
really what I was actually after.

I've tried setting up the DBIStore method but then the program fails to
run completely with error messages from DBIStore.pm.  I then switched
and tried the FileStore method which worked with just about everything
except it kept losing my DBI statement handles between accesses.  I then
switched to MemoryStore which kept my DBI handles ok but loses other
session data that I'm trying to maintain.  This is really frustrating
since I don't really understand how two different backend storage class
could lose/keep different things!

I assume the problem is that I've configured the thing wrongly so I was
hoping someone could point me in the right direction.  Here are the
relevant portions out of my httpd.conf:

Alias /epl/ /usr/local/amdb/cgi-bin/epl/
<Location /epl>
        SetHandler perl-script
        PerlHandler HTML::Embperl
        Options ExecCGI
        PerlModule Apache::DBI
        PerlModule Apache::Session
</Location>

SetEnv EMBPERL_DEBUG 2285
#SetEnv EMBPERL_DEBUG 4204781
SetEnv EMBPERL_VIRTLOG /epl/logfile.txt

PerlSetEnv EMBPERL_SESSION_CLASSES "FileStore NullLocker"
                                    ^^^^^^^^^
                                or "MemoryStore"

The effect is virtually the same if I use the SysVSemaphoreLocker option
instead of NullLocker.

If anyone can suggest what the problem is that I'm having here then I
would be very grateful.

I'm using the current latest Debian packages:

tomcat:~$ dpkg -s libapache-dbi-perl libapache-mod-perl
libhtml-embperl-perl libapache-session-perl|grep Version
Version: 0.87-1
Version: 1.21.20000114-3
Version: 1.2.1-1
Version: 1.03-2

Regards,

Christian Payne.

Reply via email to