Re: [Cgi-session-user] \t(in cleanup) Can't connect to data source '' because I can't work out
Brought to you by:
sherzodr
From: Jeffrey C. <jch...@gm...> - 2013-07-31 01:06:32
|
On 07/30/2013 04:41 PM, mim...@gm... wrote: > Issue resolved by calling flush() before returning the object. > Strangely enough, I have being using the code for over a year without > calling flush() anywhere within the sub and it has always worked until > yesterday. Your hosting provider changed something. If you have a local workstation, did the behavior change? I had to disable file locking on a system that had been stable > 2 yrs. because of changes by the hosting provided (Rackspace) eval { $session = CGI::Session->new( undef, CGI->new(), { *NoFlock => 1*, Directory => q?../session? } ) }; > > > > Mimi > > > On 31 July 2013 00:13, mim...@gm... <mailto:mim...@gm...> > <mim...@gm... <mailto:mim...@gm...>> wrote: > > I have CGI::Session wrapped up in the subroutine below, and this > has always worked. > > sub initialise_session { > > # Establish our database connection. > my $dbh = db_connect(); > > CGI::Session->name("token"); > #my $session = new > CGI::Session('driver:mysql;serializer:storable', undef, { Handle > => $dbh}) or die CGI::Session->errstr; > > # use for purpose of testing only. Above to be used > afterwards. > my $session = new CGI::Session('driver:mysql', undef, { > Handle => $dbh}) or die CGI::Session->errstr; > > return $session; > $session->flush(); > $dbh->disconnect(); > } > > Since yesterday it started to error and it's no longer able to > commit session to MySQL. > > [Tue Jul 30 04:40:37 2013] [error] [client 192.168.0.90] \t(in > cleanup) Can't connect to data source '' because I can't work out > what driver to use (it doesn't seem to contain a 'dbi:driver:' > prefix and the DBI_DRIVER env var is not set) at > /usr/local/share/perl5/CGI/Session/Driver/DBI.pm line 26, referer: > http://localhost/user.html > > No changes have been made to the subroutine, so I'm wondering why > this sudden error. As you can see above, I have called flush() to > commit the session before the db is connected. I also did the same > else where in my program, but the error persist. > > Any ideas? > > Thanks > > Mimi > > > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > > > _______________________________________________ > Cgi-session-user mailing list > Cgi...@li... > https://lists.sourceforge.net/lists/listinfo/cgi-session-user |