use Apache2::Request;
use Apache::Session::File;
use warnings;
#read cookie if this is an running session
my $r = Apache2::RequestUtil->request;
my $cookie = $r->headers_in('Cookie');
#Create a session object based on the cookie
my %session;
tie %session, 'Apache::Session::File', $cookie, {
Directory => '/tmp/plsessions',
LockDirectory => '/tmp/plsessionlock',
};
# if a new session, give it cookie back
my $session_cookie = "SESSION_ID=$session{_session_id};";
$r->headers_out("Set-Cookie" => $session_cookie);
####
[Tue Nov 05 00:01:34 2013] [error] argument is not a blessed reference (expecting an APR::Table derived object) at scripts/login.pl line 8.\n
##
##
~# rpm -Uvh perl-Apache-SessionManager-1.03-1.2.el6.rf.noarch.rpm
error: Failed dependencies:
perl(mod_perl) is needed by perl-Apache-SessionManager-1.03-1.2.el6.rf.noarch
# rpm -q mod_perl
mod_perl-2.0.4-10.el6.x86_64