You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Michael A Nachbaur <mi...@nachbaur.com> on 2001/12/05 23:50:02 UTC
Apache::Session using Frames
I have been beating my head against this problem for days, to no avail.
I have tried google searches, etc., still no dice. So, I apologize for
the noise people.
I'm using Apache::Session and cookies to perform session management. In
watching the debug messages in my error_log, I can see that the cookie
is created, the session is created, and all subsequent calls correctly
loads the session. However, part of the design for my web application
requires the use of frames, with several frames containing mod_perl
generated data. Each one of those frames relies on using the session.
I wouldn't think this would be a problem, except that some of the
frames cannot tie to the datastore, and as a result create new sessions.
I would think the default behavior would block until the session is
unlocked, but this doesn't seem to be the case. I was first using
Apache::Session::Flex (For easier configuration), but have also tried
Apache::Session::MySQL, ::DB_File and ::File, all exhibit the same problem.
This site is developed using AxKit and AxKit::XSP::Session, but the
sessions are created before AxKit is even invoked so that isn't the issue.
Any suggestions? I'd like to resolve this without loosing my hair. :)
-man
Michael A Nachbaur
Re: Apache::Session using Frames
Posted by Perrin Harkins <pe...@elem.com>.
> Just to let anyone who was wondering (and for the benefit of the
archives),
> I ended up ditching sessions all together. Instead, I'm using
> Apache::AuthDBI to do authentication, and am making calls directly to
my
> database server to maintain state. Its not the most pleasant way of
> maintaining state, but at least it works.
Then this won't be much help to you anymore, but here are a couple of
things that could have been happening:
- Not getting the cookies sent from all frames. You may have a race
condition involving when the cookie gets storeed and when other frames
send their requests.
- Not using the locking API correctly. You didn't post any code, but
the locking options for Apache::Session sometimes trip people up and you
may have had a misconfiguration of some kind.
Anyway, there's nothing wrong with writing directly to the database.
Apache::Session is just a convenient hash interface on top of that.
- Perrin
Re: Apache::Session using Frames
Posted by Michael A Nachbaur <mi...@nachbaur.com>.
Just to let anyone who was wondering (and for the benefit of the archives),
I ended up ditching sessions all together. Instead, I'm using
Apache::AuthDBI to do authentication, and am making calls directly to my
database server to maintain state. Its not the most pleasant way of
maintaining state, but at least it works.
-man
Michael A Nachbaur