Re: CGI::Session with MySQL Driver
- From: "Mark Clements" <mark.clementsREMOVETHIS@xxxxxxxxxx>
- Date: 30 May 2005 11:36:54 GMT
Alexandre Jaquet wrote:
> Fabian Pilkowski a écrit :
> > Subject: CGI::Session with MySQL Driver
> >
<snip>
> >
> > http://search.cpan.org/~sherzodr/CGI-Session-3.95/Session/MySQL.pm
> >
>
> I've read this doc, but it's doesn't seem to have example with new
> defined field
>
> I want to store user_name in session table
>
> $dbh is previously initialized
>
> $CGI::Session::MySQL::TABLE_NAME = 'session';
> my $SESSION = new CGI::Session("driver:MySQL",$query, $dbh);
> $SESSION->store($dbh,$id,'',"user_name => $username");
>
> error message :
>
> Can't connect to data source , no database driver specified and
> DBI_DSN env var not set at
> C:/indigoperl/perl/site/lib/CGI/Session/MySQL.pm line
>
> Can't get DBI::db=HASH(0x1f21af0)->{Handle}: unrecognised attribute
> at C:/indigoperl/perl/site/lib/CGI/Session/MySQL.pm line 131
Why are you calling store? This is not mentioned in the documentation
and should be considered an internal method, ie don't call it yourself.
What does
$dbh->ping()
return?
Is your script failing at new or at store?
Until you learn to ask yourself this sort of question you aren't going
to make much progress.
Mark
.
- References:
- CGI::Session with MySQL Driver
- From: Alexandre Jaquet
- Re: CGI::Session with MySQL Driver
- From: Fabian Pilkowski
- Re: CGI::Session with MySQL Driver
- From: Alexandre Jaquet
- CGI::Session with MySQL Driver
- Prev by Date: Re: CGI::Session with MySQL Driver
- Next by Date: Re: a simple question
- Previous by thread: Re: CGI::Session with MySQL Driver
- Next by thread: Re: CGI::Session with MySQL Driver
- Index(es):
Relevant Pages
|
|