Hi,
I'm new to this forum so forgive my noobquestions ;)
I took this code from CPAN:
use DBI;
use Apache::Session::MySQL;
my %session;
#make a fresh session for a first-time visitor
tie %session, 'Apache::Session::MySQL';
#stick some stuff in it
$session{visa_number} = "1234 5678 9876 5432";
#get the session id for later use
my $id = $session{_session_id};
#...time passes...
#get the session data back out again during some other request
my %session;
tie %session, 'Apache::Session::MySQL', $id;
print($session{visa_number});
#delete a session from the object store permanently
tied(%session)->delete;
I want to use this to see which people logged in to my site.
But when I run this I get this error:
Can't connect( HASH(0x19ec484)), no database driver specified and DBI_DSN env
var not set at C:/Perl/lib/Apache/Session/Lock/MySQL.pm line 36
How can I fix this?
I'm new to this forum so forgive my noobquestions ;)
I took this code from CPAN:
Code:
use strict; use DBI;
use Apache::Session::MySQL;
my %session;
#make a fresh session for a first-time visitor
tie %session, 'Apache::Session::MySQL';
#stick some stuff in it
$session{visa_number} = "1234 5678 9876 5432";
#get the session id for later use
my $id = $session{_session_id};
#...time passes...
#get the session data back out again during some other request
my %session;
tie %session, 'Apache::Session::MySQL', $id;
print($session{visa_number});
#delete a session from the object store permanently
tied(%session)->delete;
I want to use this to see which people logged in to my site.
But when I run this I get this error:
Code:
Content-type:text/html Can't connect( HASH(0x19ec484)), no database driver specified and DBI_DSN env
var not set at C:/Perl/lib/Apache/Session/Lock/MySQL.pm line 36
How can I fix this?