Re: [Cgi-session-user] Windows cgi-session-mysql
Brought to you by:
sherzodr
From: Henry de J. <he...@hj...> - 2007-06-04 22:06:27
|
I was already passing the two session ids as hidden parameters on form update, but when I read this parameter rather than the cookie to use in reconnecting to a session the behaviour did not change. The problem as I see it is that the initiated session is never saved - although a session ID is generated, this ID and the ususal expiry and date/time parameters are not written anywhere that I can tell, certainly not in the MySQL 'sessions' table. Should this module not die if writing fails? There is no error/warning log to look at - perhaps I should try this in mod-perl so I can at least get at this. I have used the new PPM interface to install cgi::session 4.13. Henry de Jong ----- Original Message ----- From: <cgi...@li...> To: <cgi...@li...> Sent: Monday, June 04, 2007 3:11 PM Subject: Cgi-session-user Digest, Vol 14, Issue 1 > 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. Windows cgi-session-mysql (Henry de Jong) > 2. Re: Windows cgi-session-mysql (Ron Savage) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 3 Jun 2007 21:57:39 -0400 > From: "Henry de Jong" <he...@hj...> > Subject: [Cgi-session-user] Windows cgi-session-mysql > To: <cgi...@li...> > Message-ID: <002201c7a64b$bda9ac40$6400a8c0@hjames4> > Content-Type: text/plain; charset="iso-8859-1" > > I have used cgi-session successfully online in a unix environment. I am > redeveloping the script and testing first in my Windows XP IIS ActiveState > Perl environment. In this environment I am not able to save a session > either to a flat file or to MySQL. Here is the relevant code > > use CGI::Carp qw(fatalsToBrowser carpout); > use CGI qw(header cookie); > use CGI::Session; > use DBI; > ............................................................................................ > $sidInfo = $q->cookie("InfoSession") || $q->param("InfoSession") || undef; > $value{'Debug'} = "---".$sidInfo; > $dbh = DBI->connect("DBI:mysql:$db:$hostname:$port", $user, > $password,\%attr); > $sI = new CGI::Session( "driver:MySQL", $sidInfo, { Handle=>$dbh }); > #$sI = new CGI::Session(undef, $sidInfo, {Directory=>'tmp'}); > $sidInfo = $sI->id; > $value{'Debug'} .= "---".$sidInfo."---"; > > Every time I refresh the page a new session id is generated. For example, > the outputted debug value shows > ---4451a04055dceee31a8c46b31c54a5c6---59855cc334f037adc84153218c686756--- > ---59855cc334f037adc84153218c686756---adedd7e8b9721b7a925d976815d7767f--- > in successive updates. > > When I had the flat file storage active, no file was created and now with > MySQL no records are added to the table that I created per instructions in > the application's database. The database handle is successfully used to > get data from other tables. There are no error messages. I am not using > the standard session name because I also have a session to store customer > information (as opposed to this order information). I have not uploaded > this yet to try on my public server. > > Any experience with this environment that might help me here, either in > solving the problem or adding more debugging? > > thanks > Henry > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 2 > Date: Mon, 4 Jun 2007 02:11:39 -0000 (UTC) > From: "Ron Savage" <ro...@sa...> > Subject: Re: [Cgi-session-user] Windows cgi-session-mysql > To: cgi...@li... > Message-ID: > <614...@ma...> > Content-Type: text/plain;charset=iso-8859-1 > > Hi Henry > > I have no problems running the same program (which I wrote, not yours) > under Windows and Unix, but I never use cookies. Perhaps it's MS's cookie > policy which is the problem? > > -- > Ron Savage > ro...@sa... > > > > > ------------------------------ > > ------------------------------------------------------------------------- > 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 14, Issue 1 > *********************************************** > > |