in reply to Re: MySQL Session database record
in thread MySQL Session database record

Hi: Select result using lates SID logged on: a_session $D = {'_SESSION_ID' => '1603e837e501ebaaef7ce4635e... Select result using last logged out user: a_session $D = {'_SESSION_ID' => '7032f2c7f5a2c721a483dc75fc...

The data in both a_session records is partof the SID. A normal select statement. Don't understand this question.

use strict; use diagnostics -verbose; use warnings; use CGI; #use Carp::Always; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use CGI qw(:standard escapeHTML); use CGI qw/:standard/; use Data::Dumper; use Digest::MD5 qw(md5_hex); use DB_File; # persistent hash database use CGI::Session; use CGI::Cookie;

Replies are listed 'Best First'.
Re^3: MySQL Session database record
by huck (Prior) on Mar 11, 2017 at 04:13 UTC

    the SELECT he mentioned is a native SQL command like

    SELECT a_session FROM sessions WHERE id='7032f2c7f5a2c721a483dc75fc295 +95e';
    If you did that it may show you something like this.
    $D = {'forename' => 'forename','timein' => 1489204868,'_SESSION_ID' => + 'eb62615586d9b8a0f14f0dd3d820bf70','username' => 'username','_SESSIO +N_ETIME' => 604800,'_SESSION_CTIME' => 1489204868,'_SESSION_REMOTE_AD +DR' => '192.168.231.211','lastname' => 'lastname','user_id' => 'uid', +'isloggedin' => 1,'_SESSION_ATIME' => 1489204868,'timeout' => 0,'atte +mpts' => 0};;$D
    I am useing the native file support in CGI:Session, it stores each session record in its own file named cgisess_SID where SID is the contents of the _SESSION_ID key. as i suspected the data is a Dumper like structure of the _DATA keys value.