[Cgi-session-user] Problem With CGI::Session v. 4.20 while generating a new session
Brought to you by:
sherzodr
From: <Ulr...@qi...> - 2007-05-08 07:59:07
|
Hello @all,=20 I just wanted to create a new session and got some errors. My code is the folowing: use strict; use Env; use File::Basename; use DBI; use lib dirname(__FILE__) . ''; use CGI; use CGI::Carp "fatalsToBrowser"; use CGI::Session; use CGI::Session::ID::md5; use Digest::MD5 qw(md5 md5_hex md5_base64); my $sid =3D md5($ENV{UNIQUE_ID}); my $cgi =3D new CGI; #print "Content-Type: text/html\n\n"; print $cgi->start_html( -title =3D> 'Switch.cgi', -author =3D> 'Ulr...@qi...' ); #print $sid; my $session =3D new CGI::Session(undef, undef, {Directory=3D>'/tmp/session'}) or die CGI::Session->errstr; $sid =3D $session->id(); print $sid; The error-message is the folowing: session.cgi: Use of uninitialized value in concatenation (.) or string at /opt/webserver/software/perl/lib/5.6.1/CGI/Session.pm line 128. Can't locate object method "generate_id" via package "CGI::Session::ID::" at /opt/webserver/software/perl/lib/5.6.1/CGI/Session.pm line 74. I'm using Perl-Version 5.6.1 CGI.pm has the version 3.05 And Session.pm has the version 4.20 Can someone tell me why it doesn't work Kind Regards Ulrich |