What I see now, and may have been happening before now that I think of
it, is that rather than the $udat{number} being incremented as it
should, it is always one and a new session is started for each request.
This most definately does not happen when I use the standard, cookie
based, sessions. The information stored in %udat is accessable from
other pages... i.e. if I add an href to my first page and simply have [+
$udat{number} on the page it links to, then it will print 1. However,
this never gets incremented no matter how many times I load the first
page.
I did add the EMBPERL_USEENV on as suggested, and the behavior is still
as mentioned above.Any other thoughts? I am at a loss right now. Also,
just to see if there was some weird conflict (as unlikely as it may be)
I removed all statements with regard to cookie configuration and
rearranged the file a bit. I have attached the related portion of my
new and improved httpd.conf at the end of my message once again.
Sean
#Embperl Setup
PerlModule MD5
PerlModule Embperl
EMBPERL_USEENV on
EMBPERL_LOG /usr/local/apache/logs/embperl.log
EMBPERL_DEBUG 2097152
EMBPERL_OBJECT_BASE base.html
#Set up sessions
PerlSetEnv EMBPERL_SESSION_CLASSES "MySQL Semaphore"
PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:sessions UserName=
Password="
PerlSetEnv EMBPERL_SESSION_MODE 2
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>
On Fri, 2002-07-26 at 14:24, Gerald Richter wrote:
> Basicly you do the right thing and it should work. The only thing I could
> see that is wrong is a missing
>
> Embperl_UseEnv on
>
> after the
>
> PerlModule Embperl
>
> without that Embperl will not look at the configuration directives you set
> with PerlSetEnv.
>
> Gerald
>
> ----- Original Message -----
> From: "Sean Conley" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 26, 2002 9:41 PM
> Subject: Cookieless Session Management
>
>
> > 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]