I tried with CGI::Session and PHP::Session to retrieve PHP sessions in Perl but no luck still. Could you anyone help out me to resolve that task? using Core PHP for session.
use CGI::Session;
use PHP::Session;
my $session = PHP::Session->new($sid, { auto_save => 1 });
$session->set(foo => 'bar');
my $cgi = new CGI;
my $sid = $cgi->param("sid") || undef;
my $session = new CGI::Session::File($sid,
{
LockDirectory=>"/tmp/sessions",
Directory => "/tmp/sessions"
});
# get the session id...
my $sid = $session->id();
print $session;
Also getting errors "Can't locate PHP/Session.pm in @INC (you may need to install the PHP::Session module)" but already installed by these cli perl -MCPAN -e shell +
install Session
question from:
https://stackoverflow.com/questions/65840473/how-to-retrieve-php-session-in-perl-file 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…