Re: new in CGI::Session::Driver::postgredsql nonexisting



On Jun 28, 11:12 pm, gautam chekuri <gautam.chek...@xxxxxxxxx> wrote:

[Thu Jun 28 20:52:39 2007] login: (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/share/perl5/CGI/Session/Driver/DBI.pm line 26
[Thu Jun 28 20:52:39 2007] login: (in cleanup) Can't call method
"commit" on unblessed reference at /usr/share/perl5/CGI/Session/Driver/
DBI.pm line 130 during global destruction.

Niklas,

Are you sure you are passing the all the params correctly in your
program ?

I use CGI::Session version 4.20 .. and it all works fine ..
[root@deepdark gautam]# perl -MCGI::Session -e 'print
$CGI::Session::VERSION, "\n";'
4.20

If you are sure that your program is correct, you might want to run it
under the debugger and
see what arguments are being passed to DBI->connect( ) from the code
in /usr/share/perl5/CGI/Session/Driver/DBI.pm at line 26

One thing that we can be sure of from the error msg you pasted is that
DBI->connect didn't get its params correctly ...

- Gautam

A conclusion I got to some time ago was that somehow my parameters
don't
get to the func:
package CGI::Session::Driver::DBI;

sub init {
my $self = shift;
if ( defined $self->{Handle} ) {
...
}
else {
line 26
}
}

And my line:
$session = new CGI::Session("driver:postgresql;id:md5", undef,
{Handle=>$dbh, ColumnType=>"binary"});

{Handle} doesn't seem to get to init, and as I'm not very good at
perl, I don't know why...

The dbh handle is working, and I've written the session code exactly
as instructed by
the docs, so my conclusion is that either the docs or libraries are
wrong. But I may
have misinterpreted the docs...

.