perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerardo Schimpf <>
Subject Sessions...
Date Tue, 19 Nov 2002 15:38:12 GMT
Hello, I'm trying to use Sessions in embperl. I'm trying to see what is in the 
%session hash, more spesific i'm triying to print out the session_id 
My question is, how can I print out the session value?

Thanks in advance....

My structure in the Mysql database (sessions table) is the following:

field               type                      null 
-------------    --------                  -------------------------
id                  int(3)                      no   auto_increment
a_session      varchar(255)           yes

and this is my code:


use Apache::Session::MySQL;

my $cookie=undef;
my %session;

tie %session, "Apache::Session::MySQL", $cookie,  {
      DataSource => 'dbi:mysql:database;host=host', #these arguments are
      UserName   => 'username',         #required when using
      Password   => 'password', 
      LockDataSource => 'dbi:mysql:database;host=host',
      LockUserName   => 'username',
      LockPassword   => 'password'

[+ $session[_session_id] +]

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message