perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Conley <scon...@cs.csubak.edu>
Subject Cookieless Session Management
Date Fri, 26 Jul 2002 19:41:48 GMT
I am using Embperl 2.0b8,  and am having problems using cookieless
session management, achieved by setting PerlSetEnv EMBPERL_SESSION_MODE
2.  When this mode is set,the session ID most definately is appended to
the URL, however modifying %udat no longer has any effect.  It seems
that the session isn't being tracked properly.  When using sessions with
cookies everything works as expected including if I add an href to
another page the session information in %udat is accessable in the
second page.  I did notice in the debugging info that I get the message
[396]SES:  Received Cookie ID: 41ab2bf07a3eca989fa3548e1a89e37c  New
Cookie ID: 41ab2bf07a3eca989fa3548e1a89e37c  User data is modified when
the "default" mode is active.  Whereas when EMBPERL_SESSION_MODE 2 is
set, the message is simply [396]SES:  Received Cookie ID:   New Cookie
ID: b8bf5c2763cf170360ec243d728ebcc9  User data is NOT modified for
every request.

Is there something that must be done differently when using cookieless
sessions?  Are they not fully implemented yet?  Is there documentation
somewhere that I am missing?  Or is there something else entirely?  I
have appended a copy of the pertinant configuration information at the
end of this email.  As you can see, this is an EXTREMELY simplistic
test.  I'm hoping that it isn't my own ignorance causing the problems,
although that is the case more often than not.

Thanks,
Sean

httpd.conf:

PerlSetEnv EMBPERL_COOKIE_PATH /
PerlSetEnv EMBPERL_COOKIE_EXPIRES +30m
PerlSetEnv EMBPERL_COOKIE_NAME testcookie
PerlSetEnv EMBPERL_SESSION_CLASSES "MySQL Semaphore"
PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:sessions
UserName=username Password=somepassword"
PerlSetEnv EMBPERL_SESSION_MODE 2

PerlModule MD5
PerlModule Embperl

EMBPERL_LOG /usr/local/apache/logs/embperl.log
EMBPERL_OBJECT_BASE base.html
EMBPERL_DEBUG 2097168

Alias /embperl /usr/local/apache/embperl

<Location /embperl>
   EMBPERL_APPNAME test
   PerlSetEnv EMBPERL_FILESMATCH "\.htm.?|\.epl$"
   SetHandler perl-script
   PerlHandler Embperl::Object 
   Options ExecCGI
</Location>

test.html:

[-
   $r = shift;
   if (!defined($udat{number})){
      $udat{number} = 0;
   }
   $udat{number}++;
-]
<html>
   <body>
      [+ $udat{number} +]<br>          
   </body>
</html>



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


Mime
View raw message