Re: [Cgi-session-user] Trouble with C::S::SQLite
Brought to you by:
sherzodr
From: Puneet K. <pu...@ei...> - 2006-03-06 21:00:53
|
Mark Stosberg wrote: > On Mon, Mar 06, 2006 at 02:10:09PM -0600, Puneet Kishor wrote: >> I upgraded from C::S 3.95 to 4.03 with the hopes of storing the session >> info in SQLite. Have run into a problem that has occupied me for a >> couple of days now. I get the following message that I can't go past -- >> >> [Mon Mar 06 13:20:24 2006] [error] index.cgi: DBD::SQLite::db prepare >> failed: no such table: sessions(1) at dbdimp.c line 269 at >> C:/Perl/site/lib/CGI/Session/Driver/sqlite.pm line 43 during global >> destruction.\r, referer: .. >> >> [Mon Mar 06 13:20:24 2006] [error] index.cgi: \t(in cleanup) >> DBD::SQLite::db prepare failed: no such table: sessions(1) at dbdimp.c >> line 269 at C:/Perl/site/lib/CGI/Session/Driver/sqlite.pm line 43 during >> global destruction.\r, referer: .. > > Puneet, > > Can you turn on some debugging to insure that the path to the SQLite > database is the same one your code is following to get there? > > Maybe the code is looking in the wrong place for it. > Mark, any suggestions how/what debugging to turn on besides the usual diagnostics and -w? Actually, I also ran the script through the debugger but wasn't any wiser. I should have added my code snippet in the above email in the first place... this is what I am doing (simplified just a tad bit) -- $DBH = DBI->connect("dbi:SQLite:dbname=/path/to/my.db") or die; my $sid = $cgi->cookie('CGISESSID') || $cgi->param('CGISESSID') || undef; $SESSION = new CGI::Session("driver:sqlite", $sid, {Handle=>$DBH}) or die CGI::Session->errstr; $COOKIE = $cgi->cookie(CGISESSID => $SESSION->id); # followed by a bunch of code to get data from $DBH... # all that works fine, web page gets rendered fine, # but the session doesn't stick, and the above mentioned # error shows up in the log I have also tried a few variations -- I tried {Datasource=>/path/to/sessions.sqlt} option, and I get exactly the same error message (created a sessions.sqlt with the requisite sessions table inside of it). Besides CGI::Session, I am using HTML::Template and CGI::Simple. Hope this helps you (and others) help me. Many thanks, -- Puneet Kishor |