You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Dan Lenski <dl...@gmail.com> on 2006/01/17 06:01:25 UTC

Embperl::Object with session management?

Hi all,
I'm new to the list, but have been using Embperl for about a year and
absolutely love it.  I've just started using Embperl::Object and
discovered a subtle issue with session management in a project with
subdirectories.

I have a project in a directory called "/var/www/cms/", under which
there is a directory called "login":

1. if I create a new user session by putting a value into %udat FROM A
FILE IN THE TOP-LEVEL DIRECTORY, the session information will be saved
properly, and all the files under this directory can access it.

2. if I create a new user session by filling %udat FROM A FILE IN THE
SUBDIRECTORY, the parent directory will NOT be aware of the saved
session info :-(

It took me >1 hour to track down what was wrong here, and it seems to
be kind of a confusing misfeature... not sure whether it's Embperl or
Apache.

I *think* that what happens is that if there is no session yet stored,
Embperl establishes the directory of the current file as the top-level
path for the new session.  The problem is that this requires you to
always initialize %udat in the topmost directory of your project in
order to make it accessible to the whole project.

So, is there any way to change this behavior?  It would be nice if the
session information could be linked to the EMBPERL_APPNAME, rather
than the current directory.  Am I just stupid, or is the current
behavior potentially confusing?

Thanks a lot,
Dan Lenski


For example:

.htaccess:
  <Files

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org