Wierd perl error
- To: sslug@sslug
- Subject: Wierd perl error
- From: "Peter Lindstrøm" <sslug@sslug>
- Date: Thu, 19 Dec 2002 00:14:42 +0800
- Newsgroups: sslug.perl
- Organization: PLIT.DK
Hej
Håber i kan hjælpe mig da jeg er lidt på bar bund her, det er første gang
jeg leger med CGI::Session::MySQL
Jeg får den her error når jeg prøver at køre mit program som er vedhæftet
nedenfor.
Peter
sslug@sslug cgi-bin]$ ./gangwar.pl
Set-Cookie: PLITGANGWARSID=6da9e1d8dfedc7154d5b174938b6983d; path=/;
expires=Mon, 09-Aug-2004 15:56:59 GMT
Expires: Wed, 18 Dec 2002 15:56:59 GMT
Date: Wed, 18 Dec 2002 15:56:59 GMT
Content-Type: text/html; charset=ISO-8859-1
Use of uninitialized value in join or string at
/usr/lib/perl5/site_perl/5.6.0/i386-linux/DBI.pm line 387 during
global destruction (#1)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl tells you what operation
you used the undefined value in. Note, however, that perl optimizes
your
program and the operation displayed in the warning may not necessarily
appear literally in your program. For example, "that $foo" is
usually optimized into "that " . $foo, and the warning will refer to
the concatenation (.) operator, even though there is no . in your
program.
(in cleanup) Uncaught exception from user code:
Can't connect( HASH(0x8472ef0)), no database driver specified and
DBI_DSN env var not set at
/usr/lib/perl5/site_perl/5.6.1/CGI/Session/MySQL.pm line 131
Carp::croak('Can\'t connect( HASH(0x8472ef0)), no database driver
specified...') called at /usr/lib/perl5/site_perl/5.6.0/i386-linux/DBI.pm
line 387
DBI::connect('DBI', undef, undef, undef, 'HASH(0x8472ef0)') called
at /usr/lib/perl5/site_perl/5.6.1/CGI/Session/MySQL.pm line 131
CGI::Session::MySQL::MySQL_dbh('CGI::Session::MySQL=HASH(0x82ad248)',
'ARRAY(0x82ac15c)') called at
/usr/lib/perl5/site_perl/5.6.1/CGI/Session/MySQL.pm line 33
CGI::Session::MySQL::store('CGI::Session::MySQL=HASH(0x82ad248)',
'6da9e1d8dfedc7154d5b174938b6983d', 'ARRAY(0x82ac15c)', 'HASH(0x82ad374)')
called at /usr/lib/perl5/site_perl/5.6.1/CGI/Session.pm line 421
CGI::Session::flush('CGI::Session::MySQL=HASH(0x82ad248)') called at
/usr/lib/perl5/site_perl/5.6.1/CGI/Session.pm line 122
CGI::Session::DESTROY('CGI::Session::MySQL=HASH(0x82ad248)') called
at ./gangwar.pl line 0
eval {...} called at ./gangwar.pl line 0
==========================
My Program :
#!/pack/collect/bin/perl -T -w
use strict;
use HTML::Template;
use CGI; # load CGI routines
use CGI::Session::MySQL;
#use CGI::Session qw/-api3/;
use lib "/home/pel/perl/PerlModules";
use Plit::Mysql;
use Plit::Common;
use Plit::Gangwar;
my $cgi = new CGI; # create new CGI object
$CGI::DISABLE_UPLOADS = 1; # Disable uploads
$CGI::POST_MAX = 512 * 1024; # limit posts to 512K max
my $Sessiondbh = Plit::Mysql::OpenDB('PlitSessions','YY','XX');
my $Admindbh = Plit::Mysql::OpenDB('AdminGangWar','YY','XX');
my $sid = $cgi->cookie('PLITGANGWARSID') || undef;
my $session = new CGI::Session::MySQL($sid, {
Handle => $Sessiondbh,
})
or die $CGI::Session::errstr;
my $session_cookie = $cgi->cookie(-name=>'PLITGANGWARSID',
-value=>$session->id,
-expires=>"+20M");
print $cgi->header(-cookie=>$session_cookie, -expires=>'now');
exit(0);
--
- Peter Lindstrøm
- http://plit.dk/ (Comments are welcome)
- Email sslug@sslug
- AIM PeterLindstroem
- Yahoo tbg_wolverine
- MSN sslug@sslug
 |
 |
 |
| |
|
|
 |
| |
|
Henvendelse vedrørende websiderne til <www_admin>.
|
Senest ændret
2005-08-10, klokken 19:55
Denne side vedligeholdes af
MHonArc
.
|
|
|
 |
 |
 |