Re: [Cgi-session-user] CGI::Session->new not accepting sid (Cees Hek)
Brought to you by:
sherzodr
From: Henry de J. <he...@hj...> - 2007-07-04 22:00:49
|
I documented a similar behaviour recently on this mailing list and found, after one helpful response, that I needed to flush the session -- $s->flush() -- to ensure that the session was written to the database. Apparently, some environments (mine was Windows/Apache) don't do this automatically. ----- Original Message ----- From: <cgi...@li...> To: <cgi...@li...> Sent: Wednesday, July 04, 2007 3:07 PM Subject: Cgi-session-user Digest, Vol 15, Issue 2 > Send Cgi-session-user mailing list submissions to > cgi...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/cgi-session-user > or, via email, send a message with subject or body 'help' to > cgi...@li... > > You can reach the person managing the list at > cgi...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Cgi-session-user digest..." > > > Today's Topics: > > 1. Re: CGI::Session->new not accepting sid (Cees Hek) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 4 Jul 2007 10:11:21 +1000 > From: "Cees Hek" <ce...@gm...> > Subject: Re: [Cgi-session-user] CGI::Session->new not accepting sid > To: "Niklas Ulvinge" <ul...@gm...> > Cc: cgi...@li... > Message-ID: > <fd8...@ma...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 7/1/07, Niklas Ulvinge <ul...@gm...> wrote: >> ******************************************************** >> Or, if you're super lazy here's some psuedo: >> sid=cookie >> s=new session(sid) >> >> print sid >> print s.sid >> ******************************************************** >> >> The output should be two lines with the same value, >> but I get different, like this: >> bbeff82a55788c38789017b1fe75a333 >> 276bc36e5a9d826564131b0f0bf37a43 >> >> And if I run it again I get: >> 276bc36e5a9d826564131b0f0bf37a43 >> ce580941292833cf55c70984632cba97 >> >> and the fast eyed can see that the second line of the first >> is the same as the first line of the second. >> >> Why does this happen? >> new must be wrong, but how? > > Are you sure that your session is being saved in the database? If you > pass a session ID to new, and that session ID does not exist in the > database, then CGI::Session throws it away, and a new session ID will > be created. > > Cheers, > > Cees > > > > ------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > > ------------------------------ > > _______________________________________________ > Cgi-session-user mailing list > Cgi...@li... > https://lists.sourceforge.net/lists/listinfo/cgi-session-user > > > End of Cgi-session-user Digest, Vol 15, Issue 2 > *********************************************** > > |