You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Sean Conley <sc...@cs.csubak.edu> on 2002/07/26 21:41:48 UTC

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: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Cookieless Session Management

Posted by Sean Conley <sc...@cs.csubak.edu>.
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" <sc...@cs.csubak.edu>
> To: <em...@perl.apache.org>
> 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: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 



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


Re: Cookie Expire (was: Cookieless Session Management)

Posted by Gerald Richter <ri...@ecos.de>.

> I believe Gerald mentioned that relative Cookie_Expire time  (i.e, +30y)
> is not functioning as of right now. I think you need to set a 'real'
> expiration value in there.
> 

Yes, that's true for 2.0. I hope to fix that in the next release

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------





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


RE: Cookieless Session Management

Posted by Justin Harrison <sh...@doublebagel.com>.
I believe Gerald mentioned that relative Cookie_Expire time  (i.e, +30y)
is not functioning as of right now. I think you need to set a 'real'
expiration value in there.

> -----Original Message-----
> From: Sean Conley [mailto:sconley@cs.csubak.edu] 
> Sent: Monday, August 05, 2002 3:28 AM
> To: Gerald Richter
> Cc: embperl@perl.apache.org
> Subject: Re: Cookieless Session Management
> 
> 
> Cookieless session management seems to be working correctly 
> now... I have NO idea what I changed or anything of that 
> nature, but I have started a more complex sort of application 
> and everything is fine.  This seems odd since make test 
> fails, but then again computers are fickle beings.
> 
> The only problem I run into now is that Mozilla doesn't seem 
> to be recognizing cookie expiration times.  Is there a known 
> bug with Mozilla 1.0 relating to this?  I have yet to try it 
> in IE since I haven't gotten around to upgrading my dedicated 
> webserver properly.  Hopefully I won't run into a whole new 
> set of problems, or the same ones all over again, since that 
> box runs OpenBSD as opposed to Linux.  If so, you'll be 
> hearing more from me.
> 
> > Hi,
> > 
> > I just have tested the session mangement without cookies 
> and it works 
> > for me. Please try in the Embperl directory to run
> > 
> > make test
> > 
> > and then request
> > 
> > http://localhost:8531/embperl/uidurl/seturlsess.htm
> > 
> > You should see three links at the bottom of the page, each 
> should have 
> > a id included and look like the following:
> > 
> > 
> http://localhost:8531/embperl/uidurl/cont.htm?EMBPERL_UID=:b05f07067e6
> > 7fc110
> > 33efa5fd440acb5
> > 
> > Does it?
> > 
> 
> See what I already typed above... since make test fails I 
> copied these files to my apache embperl directory, and they 
> appear correct.
> 
> > 
> > 
> > > Here is what I have found... I went back and ran make test on 
> > > Embperl. Most, but not all, of the mod_perl tests fail with the 
> > > message "ERR:EOF instead of reponse status line".
> > 
> > Mmh, that doesn't sound good...
> > 
> > Please run
> > 
> > make test TESTARGS="-h"
> > 
> > and send me the test/tmp/httpd.err.log and test/tmp/test.log
> 
> httpd.err.log is blank, the content of test.log is included 
> at the end of the message.
> 
> > 
> > >
> > > It still remains that cookie based session management 
> does seem to 
> > > work
> > 
> > I am sure we get it working, but first we should get make test 
> > working, to be sure your environment is correctly setup.
> > 
> > >
> > > BTW, I do think Embperl is a VERY cool thing.  I was considering 
> > > learning JSP, which still may happen just for marketability, and 
> > > found Embperl instead.  I have been a Perl nut for a few 
> years now, 
> > > and really am impressed with what has become of Embperl.
> > >
> > 
> > :-)
> > 
> > Gerald
> > 
> > -------------------------------------------------------------
> > Gerald Richter    ecos electronic communication services gmbh
> > Internetconnect * Webserver/-design/-datenbanken * Consulting
> > 
> > Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
> > E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
> > WWW:        http://www.ecos.de      Fax:      +49 6133 925152
> > -------------------------------------------------------------
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> > 
> 
> Sean
> 
> contents of test.log:
>  
> [724]Using APACHE for output...
> [724] Use Recipe Embperl
> [724]SYNTAX: switch to Embperl::Syntax::Embperl
> [724]Reading /home/install/Embperl-2.0b8/test/html/ascii as 
> input using PerlIO (3161 Bytes)...
> [724]PERF: Parse Start Time:	    30 ms 
> [724]PERF: Parse End Time:		    30 ms 
> [724]PERF: Parse Time:		    0 ms 
> [724]PERF: DOMSTAT: MemUsage = 67136 Bytes  numNodes = 5  
> numLevelLookup = 0  numLevelLookupItem = 0  numStr = 75  
> numReplace = 0  
> [724]PERF: Compile Start Time:	    30 ms 
> [724]PERF: Compile End Time:	    40 ms 
> [724]PERF: After Compile Exec End Time: 40 ms 
> [724]PERF: Perl Compile End Time:	    40 ms 
> [724]PERF: Compile Time:		    10 ms 
> [724]PERF: DOMSTAT: MemUsage = 68176 Bytes  numNodes = 5  
> numLevelLookup = 0  numLevelLookupItem = 0  numStr = 75  
> numReplace = 0  
> [724]PERF: Run Start Time: 40 ms 
> [724]PERF: Run End Time:   40 ms 
> [724]PERF: Run Time:       0 ms 
> [724]PERF: DOMSTAT: MemUsage = 68340 Bytes  numNodes = 5  
> numLevelLookup = 0  numLevelLookupItem = 0  numStr = 75  
> numReplace = 0  
> [724]PERF: input = ???
> [724]PERF: Time: 40 ms 
> [724]Request finished. Mon Aug  5 00:13:18 2002
> . Entry-SVs: 16382  Exit-SVs: 20020 
> [724]REQ: ***** Start Request at Mon Aug  5 00:13:18 2002 
> [724]Use App: Embperl
> [724]HDR:  3
> [724]HDR:  Connection=close
> [724]HDR:  Host=localhost:8531
> [724]HDR:  User-Agent=libwww-perl/5.65
> [724]ENV:  QUERY_STRING=
> [724]ENV:  REMOTE_PORT=32806
> [724]ENV:  HTTP_USER_AGENT=libwww-perl/5.65
> [724]ENV:  HTTP_HOST=localhost:8531
> [724]ENV:  EMBPERL_SRC=/home/install/Embperl-2.0b8
> [724]ENV:  GATEWAY_INTERFACE=CGI-Perl/1.1
> [724]ENV:  
> DMALLOC_OPTIONS=log=/home/install/Embperl-2.0b8/test/tmp/httpd
> .dmalloc.log,debug=0x3f03
> [724]ENV:  SCRIPT_NAME=/embperl/pure.htm
> [724]ENV:  SERVER_NAME=localhost
> [724]ENV:  MOD_PERL=mod_perl/1.27
> [724]ENV:  
> SCRIPT_FILENAME=/home/install/Embperl-2.0b8/test/html/pure.htm
> [724]ENV:  
> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/
> bin:/opt/gnome/bin
> [724]ENV:  SERVER_ADDR=127.0.0.1
> [724]ENV:  SERVER_PROTOCOL=HTTP/1.1
> [724]ENV:  HTTP_CONNECTION=close
> [724]ENV:  SERVER_SIGNATURE=
> [724]ENV:  SERVER_SOFTWARE=Apache/1.3.26 (Unix) Embperl/2.0b8 
> mod_perl/1.27
> [724]ENV:  SERVER_ADMIN=[no address given]
> [724]ENV:  REMOTE_ADDR=127.0.0.1
> [724]ENV:  DOCUMENT_ROOT=/home/install/Embperl-2.0b8/test
> [724]ENV:  REQUEST_URI=/embperl/pure.htm?
> [724]ENV:  REQUEST_METHOD=GET
> [724]ENV:  SERVER_PORT=80
> [724]Formdata... length = 0
> [724]Using APACHE for output...
> [724] Use Recipe Embperl
> [724]CACHE: Created new CacheItem 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm; 
> expires_in=0 expires_func=no 
> expires_filename=/home/install/Embperl-2.0b8/test/html/pure.ht
> m cache=no
> [724]SYNTAX: switch to Embperl::Syntax::Embperl
> [724]CACHE: Created new CacheItem 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:E
> mbperl; expires_in=0 expires_func=no expires_filename= cache=no
> [724]CACHE: Created new CacheItem 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:E
> mbperl*epcompile:; expires_in=0 expires_func=no 
> expires_filename= cache=yes
> [724]CACHE: Created new CacheItem 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:E
> mbperl*epcompile:*eprun:; expires_in=0 expires_func=no 
> expires_filename= cache=no
> [724]CACHE: 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm stat 
> file /home/install/Embperl-2.0b8/test/html/pure.htm 
> mtime=900447080 size=211
> [724]CACHE: 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm expired 
> because file /home/install/Embperl-2.0b8/test/html/pure.htm changed
> [724]CACHE: 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:E
> mbperl expired because dependencies is expired or newer
> [724]CACHE: 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:E
> mbperl*epcompile: expired because dependencies is expired or newer
> [724]CACHE: 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:E
> mbperl*epcompile:*eprun: expired because dependencies is 
> expired or newer
> [724]CACHE: 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:E
> mbperl*epcompile:*eprun: get from provider
> [724]CACHE: 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:E
> mbperl*epcompile: get from provider
> [724]CACHE: 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:E
> mbperl get from provider [724]Reading 
> /home/install/Embperl-2.0b8/test/html/pure.htm as input using 
> PerlIO (211 Bytes)...
> [724]PARSE: Start parsing 
> /home/install/Embperl-2.0b8/test/html/pure.htm DomTree = 2
> [724]PARSE: AddNode: +00  Element parent=0 node=1 type=1 
> text=att (#72) 
> [724]PARSE: AddNode: +00  Element parent=0 node=2 type=9 
> text=Document (#4) 
> [724]PARSE: AddNode: +00  Attribut parent=2 node=3 type=2 
> text=<domtree> (#3) 
> [724]PARSE: AddNode: +00  AttributValue parent=3 node=3 
> type=34 text=<noname> (#2) 
> [724]PARSE: AddNode: +00  Element parent=2 node=4 type=4 text= (#1) 
> [724]PARSE: AddNode: +00  Element parent=2 node=5 type=4 
> text= <html> <head> <title>Some tests for Embperl</title> </head>
> 
> <body>
> 
> Here it starts with some HTML Text<P>
> 
> This pure HTML Text. Nothing todo for Embperl,<BR>
> 
> just pass it thru...
> 
> <P>Ok.<P>
> 
> 
> </body>
> </html>
>  (#76) 
> [724]PARSE: AddNode: +00  Element parent=2 node=6 type=4 text= (#1) 
> [724]PERF: Parse Start Time:	    0 ms 
> [724]PERF: Parse End Time:		    0 ms 
> [724]PERF: Parse Time:		    0 ms 
> [724]PERF: DOMSTAT: MemUsage = 70384 Bytes  numNodes = 10  
> numLevelLookup = 0  numLevelLookupItem = 0  numStr = 77  
> numReplace = 0  
> [724]EPCOMP: Start compiling 
> /home/install/Embperl-2.0b8/test/html/pure.htm DomTree = 2
> [724]EPCOMP: #2 L0 -------> parent=0 node=2 type=9 
> text=Document (#4,compile) 
> [724]EPCOMP: #2 L0 CompileTimeCode:    
> use vars ('$_ep_DomTree', '@ISA', '@param') ; 
> *_ep_rp=\&XML::Embperl::DOM::Node::iReplaceChildWithCDATA;
> *_ep_rpid=\&XML::Embperl::DOM::Node::iReplaceChildWithMsgId;
> *_ep_rpurl=\&XML::Embperl::DOM::Node::iReplaceChildWithUrlDATA;
> *_ep_cp=\&XML::Embperl::DOM::Tree::iCheckpoint;
> *_ep_dcp=\&XML::Embperl::DOM::Tree::iDiscardAfterCheckpoint;
> *_ep_opt=\&Embperl::Cmd::Option; 
> *_ep_hid=\&Embperl::Cmd::Hidden; 
> *_ep_ac=\&XML::Embperl::DOM::Node::iAppendChild;
> *_ep_sa=\&XML::Embperl::DOM::Element::iSetAttribut; 
> Embperl::Util::CreateAliases ;
> 
> [724]TAB:  get EscMode = 7, Used = 2
> [724]EPCOMP: #2 L0 Code:     
> # any initialisation could be put here
> $DB::single = 1 ;
> $maxrow=100;$maxcol=10;
> 
> [724]EPCOMP: #2 L0 Set Checkpoint pending
> [724]EPCOMP: #4 L0 -------> parent=2 node=4 type=4 text= (#1,compile) 
> [724]EPCOMP: #4 L0 Checkpoint
> [724]EPCOMP: #5 L1 -------> parent=2 node=5 type=4 text=
> <html>
> <head>
> <title>Some tests for Embperl</title>
> </head>
> 
> <body>
> 
> Here it starts with some HTML Text<P>
> 
> This pure HTML Text. Nothing todo for Embperl,<BR>
> 
> just pass it thru...
> 
> <P>Ok.<P>
> 
> 
> </body>
> </html>
>  (#76,-) 
> [724]EPCOMP: #6 L0 -------> parent=2 node=6 type=4 text= (#1,compile) 
> [724]EPCOMP: #2 L0 CodeEnd:    # Include here any cleanup code
>                                 $DB::single = 0 ;
>                                 
> [724]EPCOMP: #2 L0 Set Checkpoint pending
> [724]EPCOMP: #-1  Checkpoint
> [724]DEF:  Line 1:  
> # any initialisation could be put here
> $DB::single = 1 ;
> $maxrow=100;$maxcol=10;
> 
>  _ep_cp(1) ;
> # Include here any cleanup code
>                                 $DB::single = 0 ;
>                                 
>  _ep_cp(2) ;
> 
> [724]PERF: Compile Start Time:	    0 ms 
> [724]PERF: Compile End Time:	    10 ms 
> [724]PERF: After Compile Exec End Time: 10 ms 
> [724]PERF: Perl Compile End Time:	    10 ms 
> [724]PERF: Compile Time:		    10 ms 
> [724]PERF: DOMSTAT: MemUsage = 71424 Bytes  numNodes = 10  
> numLevelLookup = 0  numLevelLookupItem = 0  numStr = 77  
> numReplace = 0  
> [724]DOM: DomTree 3 depends on DomTree 2
> [724]EVAL< <unknown>
> [724]Checkpoint: ok DomTree=3 1 -> 1 SVs=20239
> [724]Checkpoint: ok DomTree=3 2 -> 2 SVs=20239
> [724]EVAL> <undefined>
> [724]PERF: Run Start Time: 10 ms 
> [724]PERF: Run End Time:   10 ms 
> [724]PERF: Run Time:       0 ms 
> [724]PERF: DOMSTAT: MemUsage = 71588 Bytes  numNodes = 10  
> numLevelLookup = 0  numLevelLookupItem = 0  numStr = 77  
> numReplace = 0  
> [724]SES:  Received Cookie ID:   New Cookie ID:   User data 
> is NOT modified
> [724]HDR:  3
> [724]HDR:  Connection=close
> [724]HDR:  Transfer-Encoding=chunked
> [724]HDR:  Content-Type=text/html
> [724]toString: Node=4(4) RepeatLevel=0 type=4 flags=1 
> text=><= (#1) SVs=20206
> [724]toString: Node=5(5) RepeatLevel=0 type=4 flags=1 text=> 
> <html> <head> <title>Some tests for Embperl</title> </head>
> 
> <body>
> 
> Here it starts with some HTML Text<P>
> 
> This pure HTML Text. Nothing todo for Embperl,<BR>
> 
> just pass it thru...
> 
> <P>Ok.<P>
> 
> 
> </body>
> </html>
> <= (#76) SVs=20206
> [724]toString: Node=6(6) RepeatLevel=0 type=4 flags=1 
> text=><= (#1) SVs=20206
> [724]CACHE: Free content for 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:E
> mbperl*epcompile:*eprun:
> [724]Delete: DomTree = 3 SVs=20206
> [724]CACHE: Free content for 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl
> [724]CACHE: Free content for 
> *file:/home/install/Embperl-2.0b8/test/html/pure.htm
> [724]PERF: input = ???
> [724]PERF: Time: 10 ms 
> [724]Request finished. Mon Aug  5 00:13:18 2002
> . Entry-SVs: 20005  Exit-SVs: 20203 
> [724]PERF: DOMSTAT: MemUsage = 71424 Bytes  numNodes = 10  
> numLevelLookup = 0  numLevelLookupItem = 0  numStr = 77  
> numReplace = 0  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 


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


Re: Cookieless Session Management

Posted by Sean Conley <sc...@cs.csubak.edu>.
Cookieless session management seems to be working correctly now... I
have NO idea what I changed or anything of that nature, but I have
started a more complex sort of application and everything is fine.  This
seems odd since make test fails, but then again computers are fickle
beings.

The only problem I run into now is that Mozilla doesn't seem to be
recognizing cookie expiration times.  Is there a known bug with Mozilla
1.0 relating to this?  I have yet to try it in IE since I haven't gotten
around to upgrading my dedicated webserver properly.  Hopefully I won't
run into a whole new set of problems, or the same ones all over again,
since that box runs OpenBSD as opposed to Linux.  If so, you'll be
hearing more from me.

> Hi,
> 
> I just have tested the session mangement without cookies and it works for
> me. Please try in the Embperl directory to run
> 
> make test
> 
> and then request
> 
> http://localhost:8531/embperl/uidurl/seturlsess.htm
> 
> You should see three links at the bottom of the page, each should have a id
> included and look like the following:
> 
> http://localhost:8531/embperl/uidurl/cont.htm?EMBPERL_UID=:b05f07067e67fc110
> 33efa5fd440acb5
> 
> Does it?
> 

See what I already typed above... since make test fails I copied these
files to my apache embperl directory, and they appear correct.

> 
> 
> > Here is what I have found... I went back and ran make test on Embperl.
> > Most, but not all, of the mod_perl tests fail with the message "ERR:EOF
> > instead of reponse status line".
> 
> Mmh, that doesn't sound good...
> 
> Please run
> 
> make test TESTARGS="-h"
> 
> and send me the test/tmp/httpd.err.log and test/tmp/test.log

httpd.err.log is blank, the content of test.log is included at the end
of the message.

> 
> >
> > It still remains that cookie based session management does seem to work
> 
> I am sure we get it working, but first we should get make test working, to
> be sure your environment is correctly setup.
> 
> >
> > BTW, I do think Embperl is a VERY cool thing.  I was considering
> > learning JSP, which still may happen just for marketability, and found
> > Embperl instead.  I have been a Perl nut for a few years now, and really
> > am impressed with what has become of Embperl.
> >
> 
> :-)
> 
> Gerald
> 
> -------------------------------------------------------------
> Gerald Richter    ecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
> 
> Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
> E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
> WWW:        http://www.ecos.de      Fax:      +49 6133 925152
> -------------------------------------------------------------
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 

Sean

contents of test.log:
 
[724]Using APACHE for output...
[724] Use Recipe Embperl
[724]SYNTAX: switch to Embperl::Syntax::Embperl
[724]Reading /home/install/Embperl-2.0b8/test/html/ascii as input using PerlIO (3161 Bytes)...
[724]PERF: Parse Start Time:	    30 ms 
[724]PERF: Parse End Time:		    30 ms 
[724]PERF: Parse Time:		    0 ms 
[724]PERF: DOMSTAT: MemUsage = 67136 Bytes  numNodes = 5  numLevelLookup = 0  numLevelLookupItem = 0  numStr = 75  numReplace = 0  
[724]PERF: Compile Start Time:	    30 ms 
[724]PERF: Compile End Time:	    40 ms 
[724]PERF: After Compile Exec End Time: 40 ms 
[724]PERF: Perl Compile End Time:	    40 ms 
[724]PERF: Compile Time:		    10 ms 
[724]PERF: DOMSTAT: MemUsage = 68176 Bytes  numNodes = 5  numLevelLookup = 0  numLevelLookupItem = 0  numStr = 75  numReplace = 0  
[724]PERF: Run Start Time: 40 ms 
[724]PERF: Run End Time:   40 ms 
[724]PERF: Run Time:       0 ms 
[724]PERF: DOMSTAT: MemUsage = 68340 Bytes  numNodes = 5  numLevelLookup = 0  numLevelLookupItem = 0  numStr = 75  numReplace = 0  
[724]PERF: input = ???
[724]PERF: Time: 40 ms 
[724]Request finished. Mon Aug  5 00:13:18 2002
. Entry-SVs: 16382  Exit-SVs: 20020 
[724]REQ: ***** Start Request at Mon Aug  5 00:13:18 2002
[724]Use App: Embperl
[724]HDR:  3
[724]HDR:  Connection=close
[724]HDR:  Host=localhost:8531
[724]HDR:  User-Agent=libwww-perl/5.65
[724]ENV:  QUERY_STRING=
[724]ENV:  REMOTE_PORT=32806
[724]ENV:  HTTP_USER_AGENT=libwww-perl/5.65
[724]ENV:  HTTP_HOST=localhost:8531
[724]ENV:  EMBPERL_SRC=/home/install/Embperl-2.0b8
[724]ENV:  GATEWAY_INTERFACE=CGI-Perl/1.1
[724]ENV:  DMALLOC_OPTIONS=log=/home/install/Embperl-2.0b8/test/tmp/httpd.dmalloc.log,debug=0x3f03
[724]ENV:  SCRIPT_NAME=/embperl/pure.htm
[724]ENV:  SERVER_NAME=localhost
[724]ENV:  MOD_PERL=mod_perl/1.27
[724]ENV:  SCRIPT_FILENAME=/home/install/Embperl-2.0b8/test/html/pure.htm
[724]ENV:  PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin:/opt/gnome/bin
[724]ENV:  SERVER_ADDR=127.0.0.1
[724]ENV:  SERVER_PROTOCOL=HTTP/1.1
[724]ENV:  HTTP_CONNECTION=close
[724]ENV:  SERVER_SIGNATURE=
[724]ENV:  SERVER_SOFTWARE=Apache/1.3.26 (Unix) Embperl/2.0b8 mod_perl/1.27
[724]ENV:  SERVER_ADMIN=[no address given]
[724]ENV:  REMOTE_ADDR=127.0.0.1
[724]ENV:  DOCUMENT_ROOT=/home/install/Embperl-2.0b8/test
[724]ENV:  REQUEST_URI=/embperl/pure.htm?
[724]ENV:  REQUEST_METHOD=GET
[724]ENV:  SERVER_PORT=80
[724]Formdata... length = 0
[724]Using APACHE for output...
[724] Use Recipe Embperl
[724]CACHE: Created new CacheItem *file:/home/install/Embperl-2.0b8/test/html/pure.htm; expires_in=0 expires_func=no expires_filename=/home/install/Embperl-2.0b8/test/html/pure.htm cache=no
[724]SYNTAX: switch to Embperl::Syntax::Embperl
[724]CACHE: Created new CacheItem *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl; expires_in=0 expires_func=no expires_filename= cache=no
[724]CACHE: Created new CacheItem *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl*epcompile:; expires_in=0 expires_func=no expires_filename= cache=yes
[724]CACHE: Created new CacheItem *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl*epcompile:*eprun:; expires_in=0 expires_func=no expires_filename= cache=no
[724]CACHE: *file:/home/install/Embperl-2.0b8/test/html/pure.htm stat file /home/install/Embperl-2.0b8/test/html/pure.htm mtime=900447080 size=211
[724]CACHE: *file:/home/install/Embperl-2.0b8/test/html/pure.htm expired because file /home/install/Embperl-2.0b8/test/html/pure.htm changed
[724]CACHE: *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl expired because dependencies is expired or newer
[724]CACHE: *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl*epcompile: expired because dependencies is expired or newer
[724]CACHE: *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl*epcompile:*eprun: expired because dependencies is expired or newer
[724]CACHE: *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl*epcompile:*eprun: get from provider
[724]CACHE: *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl*epcompile: get from provider
[724]CACHE: *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl get from provider
[724]Reading /home/install/Embperl-2.0b8/test/html/pure.htm as input using PerlIO (211 Bytes)...
[724]PARSE: Start parsing /home/install/Embperl-2.0b8/test/html/pure.htm DomTree = 2
[724]PARSE: AddNode: +00  Element parent=0 node=1 type=1 text=att (#72) 
[724]PARSE: AddNode: +00  Element parent=0 node=2 type=9 text=Document (#4) 
[724]PARSE: AddNode: +00  Attribut parent=2 node=3 type=2 text=<domtree> (#3) 
[724]PARSE: AddNode: +00  AttributValue parent=3 node=3 type=34 text=<noname> (#2) 
[724]PARSE: AddNode: +00  Element parent=2 node=4 type=4 text= (#1) 
[724]PARSE: AddNode: +00  Element parent=2 node=5 type=4 text=
<html>
<head>
<title>Some tests for Embperl</title>
</head>

<body>

Here it starts with some HTML Text<P>

This pure HTML Text. Nothing todo for Embperl,<BR>

just pass it thru...

<P>Ok.<P>


</body>
</html>
 (#76) 
[724]PARSE: AddNode: +00  Element parent=2 node=6 type=4 text= (#1) 
[724]PERF: Parse Start Time:	    0 ms 
[724]PERF: Parse End Time:		    0 ms 
[724]PERF: Parse Time:		    0 ms 
[724]PERF: DOMSTAT: MemUsage = 70384 Bytes  numNodes = 10  numLevelLookup = 0  numLevelLookupItem = 0  numStr = 77  numReplace = 0  
[724]EPCOMP: Start compiling /home/install/Embperl-2.0b8/test/html/pure.htm DomTree = 2
[724]EPCOMP: #2 L0 -------> parent=0 node=2 type=9 text=Document (#4,compile) 
[724]EPCOMP: #2 L0 CompileTimeCode:    
use vars ('$_ep_DomTree', '@ISA', '@param') ;
*_ep_rp=\&XML::Embperl::DOM::Node::iReplaceChildWithCDATA;
*_ep_rpid=\&XML::Embperl::DOM::Node::iReplaceChildWithMsgId;
*_ep_rpurl=\&XML::Embperl::DOM::Node::iReplaceChildWithUrlDATA;
*_ep_cp=\&XML::Embperl::DOM::Tree::iCheckpoint;
*_ep_dcp=\&XML::Embperl::DOM::Tree::iDiscardAfterCheckpoint;
*_ep_opt=\&Embperl::Cmd::Option;
*_ep_hid=\&Embperl::Cmd::Hidden;
*_ep_ac=\&XML::Embperl::DOM::Node::iAppendChild;
*_ep_sa=\&XML::Embperl::DOM::Element::iSetAttribut; 
Embperl::Util::CreateAliases ;

[724]TAB:  get EscMode = 7, Used = 2
[724]EPCOMP: #2 L0 Code:     
# any initialisation could be put here
$DB::single = 1 ;
$maxrow=100;$maxcol=10;

[724]EPCOMP: #2 L0 Set Checkpoint pending
[724]EPCOMP: #4 L0 -------> parent=2 node=4 type=4 text= (#1,compile) 
[724]EPCOMP: #4 L0 Checkpoint
[724]EPCOMP: #5 L1 -------> parent=2 node=5 type=4 text=
<html>
<head>
<title>Some tests for Embperl</title>
</head>

<body>

Here it starts with some HTML Text<P>

This pure HTML Text. Nothing todo for Embperl,<BR>

just pass it thru...

<P>Ok.<P>


</body>
</html>
 (#76,-) 
[724]EPCOMP: #6 L0 -------> parent=2 node=6 type=4 text= (#1,compile) 
[724]EPCOMP: #2 L0 CodeEnd:    # Include here any cleanup code
                                $DB::single = 0 ;
                                
[724]EPCOMP: #2 L0 Set Checkpoint pending
[724]EPCOMP: #-1  Checkpoint
[724]DEF:  Line 1:  
# any initialisation could be put here
$DB::single = 1 ;
$maxrow=100;$maxcol=10;

 _ep_cp(1) ;
# Include here any cleanup code
                                $DB::single = 0 ;
                                
 _ep_cp(2) ;

[724]PERF: Compile Start Time:	    0 ms 
[724]PERF: Compile End Time:	    10 ms 
[724]PERF: After Compile Exec End Time: 10 ms 
[724]PERF: Perl Compile End Time:	    10 ms 
[724]PERF: Compile Time:		    10 ms 
[724]PERF: DOMSTAT: MemUsage = 71424 Bytes  numNodes = 10  numLevelLookup = 0  numLevelLookupItem = 0  numStr = 77  numReplace = 0  
[724]DOM: DomTree 3 depends on DomTree 2
[724]EVAL< <unknown>
[724]Checkpoint: ok DomTree=3 1 -> 1 SVs=20239
[724]Checkpoint: ok DomTree=3 2 -> 2 SVs=20239
[724]EVAL> <undefined>
[724]PERF: Run Start Time: 10 ms 
[724]PERF: Run End Time:   10 ms 
[724]PERF: Run Time:       0 ms 
[724]PERF: DOMSTAT: MemUsage = 71588 Bytes  numNodes = 10  numLevelLookup = 0  numLevelLookupItem = 0  numStr = 77  numReplace = 0  
[724]SES:  Received Cookie ID:   New Cookie ID:   User data is NOT modified
[724]HDR:  3
[724]HDR:  Connection=close
[724]HDR:  Transfer-Encoding=chunked
[724]HDR:  Content-Type=text/html
[724]toString: Node=4(4) RepeatLevel=0 type=4 flags=1 text=><= (#1) SVs=20206
[724]toString: Node=5(5) RepeatLevel=0 type=4 flags=1 text=>
<html>
<head>
<title>Some tests for Embperl</title>
</head>

<body>

Here it starts with some HTML Text<P>

This pure HTML Text. Nothing todo for Embperl,<BR>

just pass it thru...

<P>Ok.<P>


</body>
</html>
<= (#76) SVs=20206
[724]toString: Node=6(6) RepeatLevel=0 type=4 flags=1 text=><= (#1) SVs=20206
[724]CACHE: Free content for *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl*epcompile:*eprun:
[724]Delete: DomTree = 3 SVs=20206
[724]CACHE: Free content for *file:/home/install/Embperl-2.0b8/test/html/pure.htm*epparse:Embperl
[724]CACHE: Free content for *file:/home/install/Embperl-2.0b8/test/html/pure.htm
[724]PERF: input = ???
[724]PERF: Time: 10 ms 
[724]Request finished. Mon Aug  5 00:13:18 2002
. Entry-SVs: 20005  Exit-SVs: 20203 
[724]PERF: DOMSTAT: MemUsage = 71424 Bytes  numNodes = 10  numLevelLookup = 0  numLevelLookupItem = 0  numStr = 77  numReplace = 0  


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


Re: Cookieless Session Management

Posted by Gerald Richter <ri...@ecos.de>.
Hi,

I just have tested the session mangement without cookies and it works for
me. Please try in the Embperl directory to run

make test

and then request

http://localhost:8531/embperl/uidurl/seturlsess.htm

You should see three links at the bottom of the page, each should have a id
included and look like the following:

http://localhost:8531/embperl/uidurl/cont.htm?EMBPERL_UID=:b05f07067e67fc110
33efa5fd440acb5

Does it?



> Here is what I have found... I went back and ran make test on Embperl.
> Most, but not all, of the mod_perl tests fail with the message "ERR:EOF
> instead of reponse status line".

Mmh, that doesn't sound good...

Please run

make test TESTARGS="-h"

and send me the test/tmp/httpd.err.log and test/tmp/test.log

>
> It still remains that cookie based session management does seem to work

I am sure we get it working, but first we should get make test working, to
be sure your environment is correctly setup.

>
> BTW, I do think Embperl is a VERY cool thing.  I was considering
> learning JSP, which still may happen just for marketability, and found
> Embperl instead.  I have been a Perl nut for a few years now, and really
> am impressed with what has become of Embperl.
>

:-)

Gerald

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



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


RE: Cookieless Session Management

Posted by Justin Harrison <sh...@doublebagel.com>.
Regarding 'make test' errors - Same here:

Starting httpd...       
pid = 20592  ok

Testing mod_perl mode...

#0 ascii...                   ok
#1 pure.htm...                ok
#2 nooutput.htm...            ERR:EOF instead of reponse status line
Input:          test/html/nooutput.htm
Output:         test/tmp/out.htm
Log:            test/tmp/test.log
Testparameter:
  version = 2
  repeat = 2

 ERRORS detected! NOT all test have been passed successfully

make: *** [test_dynamic] Error 1


> -----Original Message-----
> From: Sean Conley [mailto:sconley@cs.csubak.edu] 
> Sent: Saturday, July 27, 2002 3:39 AM
> To: Gerald Richter
> Cc: embperl@perl.apache.org
> Subject: Re: Cookieless Session Management
> 
> 
> Here is what I have found... I went back and ran make test on 
> Embperl. 
> Most, but not all, of the mod_perl tests fail with the 
> message "ERR:EOF instead of reponse status line".  For 
> example, test #131 completes fine.  However when I run test 
> #130 it ends up with the following
> message:
> 
> Starting httpd...       pid = 21027  ok
> 
> Testing mod_perl mode...
> 
> #130 mdatsess.htm...          ERR:EOF instead of reponse status line
> Input:          test/html/mdatsess.htm
> Output:         test/tmp/out.htm
> Log:            test/tmp/test.log
> Testparameter:
>   query_info = cnt=0
>   cookie = expectno
>   offline = 0
> 
>  ERRORS detected! NOT all test have been passed successfully
> 
> It still remains that cookie based session management does 
> seem to work as it should, but cookieless sessions do not.  
> Whatever the case may be, they both behave differently to be 
> sure.  I can watch session information being inserted into 
> the database whenever I am using cookie based session 
> management, and see by the logs that a session is maintained 
> since it gets the session_id and reports it.  However, with 
> cookieless sessions this session id seems to be lost so a new 
> one is issued at the next request.  Unless it is that the 
> session is expiring for some reason, and I am not sure how to 
> tell if this is the case. 
> And, for reference, I have Apache::Session v1.54  and 
> Apache::SessionX v2.00b3 installed.  Both were installed by 
> using the CPAN shell, everything else I have downloaded and 
> installed from source myself.
> 
> Enjoy the conference, and if you (Gerald) don't get a chance 
> to actually test this for awhile it is not going to be a big 
> problem.  This is just a personal project otherwise I'd be 
> pushing for a commercial support license.  However, I am one 
> of the many poor technical people that has been laid off, so 
> I don't have the money to buy a contract myself.  :O)
> 
> BTW, I do think Embperl is a VERY cool thing.  I was 
> considering learning JSP, which still may happen just for 
> marketability, and found Embperl instead.  I have been a Perl 
> nut for a few years now, and really am impressed with what 
> has become of Embperl.
> 
> Any input from anybody on the above error would be 
> appreciated.  As far as I can tell mod_perl is installed and 
> working properly.  I installed it the same way I have a 
> hundred times before... but that doesn't mean I didn't have 
> it wrong all those times before as well.  I can't run make 
> test on mod_perl since it is installed as a DSO, but if I 
> compile it into apache make test runs fine.  I am baffled... 
> and it isn't the first time.
> 
> Sean
> 
> On Fri, 2002-07-26 at 16:13, Gerald Richter wrote:
> > Sean and Justin,
> > 
> > 
> > 
> > > I've done:
> > >
> > > EMBPERL_SESSION_MODE 2
> > >
> > > Do I need to do something special other
> > > than that?
> > >
> > 
> > Session management must be working at all. That means 
> Apache::Session 
> > and Apache::SessionX should be installed. If cookie based session 
> > management is working, then everything should be ok. To verfiy this 
> > further run
> > 
> > make test
> > 
> > and make sure that session mangement test are ok (and are 
> not skiped).
> > 
> > If all this is given setting the session mode to 2 should be enough.
> > 
> > Cookieless session management is a very new feature and not widely 
> > used,so maybe there is still a bug in Embperl, but I am 
> sure we will 
> > figure out what's going wrong.
> > 
> > Gerald
> > 
> > P.S. I am currently on the O'Reilly OpenSource Convention, 
> so I cannot 
> > test it right now.
> > 
> > 
> > 
> > >
> > > > -----Original Message-----
> > > > From: Gerald Richter [mailto:richter@ecos.de]
> > > > Sent: Friday, July 26, 2002 5:24 PM
> > > > To: Sean Conley; embperl@perl.apache.org
> > > > Subject: Re: Cookieless Session Management
> > > >
> > > >
> > > > 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" <sc...@cs.csubak.edu>
> > > > To: <em...@perl.apache.org>
> > > > 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: embperl-unsubscribe@perl.apache.org
> > > > > For additional commands, e-mail: embperl-help@perl.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > 
> ------------------------------------------------------------------
> > > > ---
> > > > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > > > For additional commands, e-mail: embperl-help@perl.apache.org
> > > >
> > >
> > >
> > > 
> --------------------------------------------------------------------
> > > -
> > > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > > For additional commands, e-mail: embperl-help@perl.apache.org
> > >
> > >
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 


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


Re: Cookieless Session Management

Posted by Sean Conley <sc...@cs.csubak.edu>.
Here is what I have found... I went back and ran make test on Embperl. 
Most, but not all, of the mod_perl tests fail with the message "ERR:EOF
instead of reponse status line".  For example, test #131 completes
fine.  However when I run test #130 it ends up with the following
message:

Starting httpd...       pid = 21027  ok

Testing mod_perl mode...

#130 mdatsess.htm...          ERR:EOF instead of reponse status line
Input:          test/html/mdatsess.htm
Output:         test/tmp/out.htm
Log:            test/tmp/test.log
Testparameter:
  query_info = cnt=0
  cookie = expectno
  offline = 0

 ERRORS detected! NOT all test have been passed successfully

It still remains that cookie based session management does seem to work
as it should, but cookieless sessions do not.  Whatever the case may be,
they both behave differently to be sure.  I can watch session
information being inserted into the database whenever I am using cookie
based session management, and see by the logs that a session is
maintained since it gets the session_id and reports it.  However, with
cookieless sessions this session id seems to be lost so a new one is
issued at the next request.  Unless it is that the session is expiring
for some reason, and I am not sure how to tell if this is the case. 
And, for reference, I have Apache::Session v1.54  and Apache::SessionX
v2.00b3 installed.  Both were installed by using the CPAN shell,
everything else I have downloaded and installed from source myself.

Enjoy the conference, and if you (Gerald) don't get a chance to actually
test this for awhile it is not going to be a big problem.  This is just
a personal project otherwise I'd be pushing for a commercial support
license.  However, I am one of the many poor technical people that has
been laid off, so I don't have the money to buy a contract myself.  :O)

BTW, I do think Embperl is a VERY cool thing.  I was considering
learning JSP, which still may happen just for marketability, and found
Embperl instead.  I have been a Perl nut for a few years now, and really
am impressed with what has become of Embperl.

Any input from anybody on the above error would be appreciated.  As far
as I can tell mod_perl is installed and working properly.  I installed
it the same way I have a hundred times before... but that doesn't mean I
didn't have it wrong all those times before as well.  I can't run make
test on mod_perl since it is installed as a DSO, but if I compile it
into apache make test runs fine.  I am baffled... and it isn't the first
time.

Sean

On Fri, 2002-07-26 at 16:13, Gerald Richter wrote:
> Sean and Justin,
> 
> 
> 
> > I've done:
> >
> > EMBPERL_SESSION_MODE 2
> >
> > Do I need to do something special other
> > than that?
> >
> 
> Session management must be working at all. That means Apache::Session and
> Apache::SessionX should be installed. If cookie based session management is
> working, then everything should be ok. To verfiy this further run
> 
> make test
> 
> and make sure that session mangement test are ok (and are not skiped).
> 
> If all this is given setting the session mode to 2 should be enough.
> 
> Cookieless session management is a very new feature and not widely used,so
> maybe there is still a bug in Embperl, but I am sure we will figure out
> what's going wrong.
> 
> Gerald
> 
> P.S. I am currently on the O'Reilly OpenSource Convention, so I cannot test
> it right now.
> 
> 
> 
> >
> > > -----Original Message-----
> > > From: Gerald Richter [mailto:richter@ecos.de]
> > > Sent: Friday, July 26, 2002 5:24 PM
> > > To: Sean Conley; embperl@perl.apache.org
> > > Subject: Re: Cookieless Session Management
> > >
> > >
> > > 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" <sc...@cs.csubak.edu>
> > > To: <em...@perl.apache.org>
> > > 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: embperl-unsubscribe@perl.apache.org
> > > > For additional commands, e-mail: embperl-help@perl.apache.org
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > > For additional commands, e-mail: embperl-help@perl.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 



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


Re: Cookieless Session Management

Posted by Gerald Richter <ri...@ecos.de>.
Hi,
>
> Cookie management works absolutely fine :-)
>
> I've tested %mdat and %udat to keep counters, and it works. It is just
> cookieless which is failing.
>

...and make test is working too (and not skiping the session tests)? If this
is the case I will look into it when I am back at home next week.

> Speaking of which - Sean, you appear to be using MySQL for session
> storage? I was worried about using MySQL because of any potential large
> overhead. Assuming apache::dbi for a persistent connection, how does
> MySQL work for it?
>

For me it does a good job, but I never have benchmarked it against other
session storages.

> I hope you are enjoying the conference Gerald!
>

Yes, it's great!

Gerald


> Justin
>
> > -----Original Message-----
> > From: Gerald Richter [mailto:richter@ecos.de]
> > Sent: Friday, July 26, 2002 7:13 PM
> > To: Justin Harrison; Sean Conley; embperl@perl.apache.org
> > Subject: Re: Cookieless Session Management
> >
> >
> > Sean and Justin,
> >
> >
> >
> > > I've done:
> > >
> > > EMBPERL_SESSION_MODE 2
> > >
> > > Do I need to do something special other
> > > than that?
> > >
> >
> > Session management must be working at all. That means
> > Apache::Session and Apache::SessionX should be installed. If
> > cookie based session management is working, then everything
> > should be ok. To verfiy this further run
> >
> > make test
> >
> > and make sure that session mangement test are ok (and are not skiped).
> >
> > If all this is given setting the session mode to 2 should be enough.
> >
> > Cookieless session management is a very new feature and not
> > widely used,so maybe there is still a bug in Embperl, but I
> > am sure we will figure out what's going wrong.
> >
> > Gerald
> >
> > P.S. I am currently on the O'Reilly OpenSource Convention, so
> > I cannot test it right now.
> >
> >
> >
> > >
> > > > -----Original Message-----
> > > > From: Gerald Richter [mailto:richter@ecos.de]
> > > > Sent: Friday, July 26, 2002 5:24 PM
> > > > To: Sean Conley; embperl@perl.apache.org
> > > > Subject: Re: Cookieless Session Management
> > > >
> > > >
> > > > 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" <sc...@cs.csubak.edu>
> > > > To: <em...@perl.apache.org>
> > > > 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: embperl-unsubscribe@perl.apache.org
> > > > > For additional commands, e-mail: embperl-help@perl.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > --------------------------------------------------------------------
> > > > -
> > > > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > > > For additional commands, e-mail: embperl-help@perl.apache.org
> > > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > > For additional commands, e-mail: embperl-help@perl.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
>


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


RE: Cookieless Session Management

Posted by Justin Harrison <sh...@doublebagel.com>.
Hi,


Cookie management works absolutely fine :-) 

I've tested %mdat and %udat to keep counters, and it works. It is just
cookieless which is failing.

Speaking of which - Sean, you appear to be using MySQL for session
storage? I was worried about using MySQL because of any potential large
overhead. Assuming apache::dbi for a persistent connection, how does
MySQL work for it?

I hope you are enjoying the conference Gerald!

Justin

> -----Original Message-----
> From: Gerald Richter [mailto:richter@ecos.de] 
> Sent: Friday, July 26, 2002 7:13 PM
> To: Justin Harrison; Sean Conley; embperl@perl.apache.org
> Subject: Re: Cookieless Session Management
> 
> 
> Sean and Justin,
> 
> 
> 
> > I've done:
> >
> > EMBPERL_SESSION_MODE 2
> >
> > Do I need to do something special other
> > than that?
> >
> 
> Session management must be working at all. That means 
> Apache::Session and Apache::SessionX should be installed. If 
> cookie based session management is working, then everything 
> should be ok. To verfiy this further run
> 
> make test
> 
> and make sure that session mangement test are ok (and are not skiped).
> 
> If all this is given setting the session mode to 2 should be enough.
> 
> Cookieless session management is a very new feature and not 
> widely used,so maybe there is still a bug in Embperl, but I 
> am sure we will figure out what's going wrong.
> 
> Gerald
> 
> P.S. I am currently on the O'Reilly OpenSource Convention, so 
> I cannot test it right now.
> 
> 
> 
> >
> > > -----Original Message-----
> > > From: Gerald Richter [mailto:richter@ecos.de]
> > > Sent: Friday, July 26, 2002 5:24 PM
> > > To: Sean Conley; embperl@perl.apache.org
> > > Subject: Re: Cookieless Session Management
> > >
> > >
> > > 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" <sc...@cs.csubak.edu>
> > > To: <em...@perl.apache.org>
> > > 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: embperl-unsubscribe@perl.apache.org
> > > > For additional commands, e-mail: embperl-help@perl.apache.org
> > > >
> > > >
> > >
> > >
> > > 
> --------------------------------------------------------------------
> > > -
> > > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > > For additional commands, e-mail: embperl-help@perl.apache.org
> > >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 


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


Re: Cookieless Session Management

Posted by Gerald Richter <ri...@ecos.de>.
Sean and Justin,



> I've done:
>
> EMBPERL_SESSION_MODE 2
>
> Do I need to do something special other
> than that?
>

Session management must be working at all. That means Apache::Session and
Apache::SessionX should be installed. If cookie based session management is
working, then everything should be ok. To verfiy this further run

make test

and make sure that session mangement test are ok (and are not skiped).

If all this is given setting the session mode to 2 should be enough.

Cookieless session management is a very new feature and not widely used,so
maybe there is still a bug in Embperl, but I am sure we will figure out
what's going wrong.

Gerald

P.S. I am currently on the O'Reilly OpenSource Convention, so I cannot test
it right now.



>
> > -----Original Message-----
> > From: Gerald Richter [mailto:richter@ecos.de]
> > Sent: Friday, July 26, 2002 5:24 PM
> > To: Sean Conley; embperl@perl.apache.org
> > Subject: Re: Cookieless Session Management
> >
> >
> > 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" <sc...@cs.csubak.edu>
> > To: <em...@perl.apache.org>
> > 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: embperl-unsubscribe@perl.apache.org
> > > For additional commands, e-mail: embperl-help@perl.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
>


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


RE: Cookieless Session Management

Posted by Justin Harrison <sh...@doublebagel.com>.
I've done:

EMBPERL_SESSION_MODE 2

But it doesn't seem to be "holding"

As a test I made a link in my embperl document back to itself:

"<a href="http://whatever/moo/test.htm">Test!</a>"

And it prints just like that. Do I need to do something special other
than that?


> -----Original Message-----
> From: Gerald Richter [mailto:richter@ecos.de] 
> Sent: Friday, July 26, 2002 5:24 PM
> To: Sean Conley; embperl@perl.apache.org
> Subject: Re: Cookieless Session Management
> 
> 
> 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" <sc...@cs.csubak.edu>
> To: <em...@perl.apache.org>
> 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: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 


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


Re: Cookieless Session Management

Posted by Gerald Richter <ri...@ecos.de>.
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" <sc...@cs.csubak.edu>
To: <em...@perl.apache.org>
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: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
>


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