You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Joe Lauer <jo...@rootlevel.com> on 2000/09/17 00:08:30 UTC
Session errors
I've been having a lot of problems with sessions lately. I'll run through
everything I've done so far.
I have currently downgraded my Apache::Session from 1.53 to 1.03 since I am
running Embperl 1.2.1 with mod_perl 1.24. In my original httpd.conf file I
previously used:
PerlSetEnv EMBPERL_SESSION_CLASSES "DBIStore SysVSemaphoreLocker"
PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:sessions
UserName=username Password=password"
However, if I use SysVSemaphoreLocker then I get this error when it tries to
load a page from a browser.
[27330]ERR: 24: Line 12: Error in Perl code: Permission denied at
/usr/local/lib/perl5/site_perl/5.005/Apache/Session/SysVSemaphoreLocker.pm
line 63.
Apache/1.3.12 (Unix) mod_perl/1.24 HTML::Embperl 1.2.1 [Fri Sep 15 23:22:42
2000]
So, I searched through all my archived emails from the mailing list and I
switched from SysVSemaphoreLocker to NullLocker. After I did that, my pages
began to load again. The EMBPERL_UID cookie was even getting set so I
thought that my session problems were fixed.
However, after a couple reloads of the browser... sessions mysteriously
disappear. In a couple freaky times, a session from another developer
showed up in my browser. This is definitely not the kind of session
handling i want. Anyways.. this problem never showed up when I used
SysVSemaphoreLocker, but I cannot think of anyway to get rid of the
Permission denied error.
Thus, I have two questions:
1. What is the difference between NullLocker and SysVSemaphoreLocker and is
there anyway to fix this mysterious disappearing of sessions with
NullLocker?
2. Can I go back to SysVSemaphoreLocker which has always worked for me in
keeping sessions properly?
Thanks,
Joe
______________________________________________________
joe lauer rootlevel
product developer 743 beaubien, suite 300
p.313.961.4407 x302 detroit, mi 48226
f.313.961.4568 www.rootlevel.com
Re: Session errors
Posted by Gerald Richter <ri...@ecos.de>.
> 1. What is the difference between NullLocker and SysVSemaphoreLocker and
is
> there anyway to fix this mysterious disappearing of sessions with
> NullLocker?
>
NullLocker does not any locking at all, SysVSemaphoreLocker serialize
session access.
> 2. Can I go back to SysVSemaphoreLocker which has always worked for me in
> keeping sessions properly?
>
The semphaphore has the wrong owner. You can display the semaphore with
"ipcs".
Just remove the semaphore with "ipcrm" and Apache::Session will create a new
one with the correct owner
Gerald