Ich versuche gerade auch CGI::SESSION in Verbindung mit MYSQL zu benutzen, bekomme das aber auch nicht hin, hat das jetzt jemand realisiert?
Hier mein Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use CGI::Carp "fatalsToBrowser";
use CGI qw(:all);
use warnings;
use DBI;
use lib './module';
use strict;
use CGI::Session;
use vars qw($dbms $dbname $dbuser $dbpasswd $session $sid $dbh $lg_name);
require "dbinfo.cgi";
my $cgi = new CGI;
my $dbh = DBI->connect( "$dbms:$dbname","$dbuser","$dbpasswd", {PrintError => 0, RaiseError => 1}) || die
"Verbindung zur Datenbank fehlgeschlagen: $DBI::errstr";
$sid = $cgi->cookie('YAMBE_SESSID') || $cgi->param('YAMBE_SESSID') || undef;
$session = new CGI::Session("driver:MySQL", $sid, {Handle=>$dbh});
$session->expire('3');
$session->param("USER", $lg_name || 'gast');
my $cookie = $cgi->cookie(YAMBE_SESSID => $session->id );
print $cgi->header(-cookie=>$cookie);
Und hier die Fehlermeldung
Quote[Mon Aug 21 19:29:28 2006] session.cgi: Use of uninitialized value in numeric eq (==) at C:/Perl/site/lib/CGI/Session/MySQL.pm line 35 during global destruction. [Mon Aug 21 19:29:28 2006] session.cgi: Use of uninitialized value in concatenation (.) or string at C:/Perl/site/lib/CGI/Session/MySQL.pm line 36 during global destruction. [Mon Aug 21 19:29:28 2006] session.cgi: (in cleanup) could not flush: Couldn't acquire lock on id '9065907de0cbdcd1fd81dd7b20c7cc84'. Lock status: at ...\cgi-bin\yambe\data\session.cgi line 0
Tom\n\n
<!--EDIT|Tom|1156181525-->