Thread CGI::Session in Verbindung mit MySQL (17 answers)
Opened by esskar at 2004-04-11 18:13

Tom
 2006-08-21 21:31
#2065 #2065
User since
2003-09-20
470 Artikel
BenutzerIn
[Homepage] [default_avatar]
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

Code: (dl )
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-->
Computerprobleme??? -> http://www.weber-computerhilfe.de

Fordere keine Anerkennung!
Zeige was und man wird Dich kennen

View full thread CGI::Session in Verbindung mit MySQL