Welcome Guest, Not a member yet? Register   Sign In
Session timestamp error
#1

(This post was last modified: 08-09-2021, 05:09 AM by MatheusCastro.)

My database session had the timestamp reset since the last update to 4.1.3.

Code for create table equal the documentation:

PHP Code:
CREATE TABLE IF NOT EXISTS `ci_sessions` (
        `idvarchar(128NOT NULL,
        `ip_addressvarchar(45NOT NULL,
        `timestamptimestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
        `datablob NOT NULL,
        KEY `ci_sessions_timestamp` (`timestamp`)
); 
And the session is timed to zero in database.

In version 4.1.1:
File DatabaseHandler write function.

PHP Code:
$insertData = [
 
'id'        => $sessionID,
 
'ip_address' => $this->ipAddress,
 
'timestamp'  => time(),
 
'data'      => $this->platform === 'postgre' base64_encode($sessionData) : $sessionData,
 ]; 


In version 4.1.3:

PHP Code:
$insertData = [
 
'id'        => $sessionID,
 
'ip_address' => $this->ipAddress,
 
'timestamp'  => 'now()',
 
'data'      => $this->platform === 'postgre' '\x' bin2hex($sessionData) : $sessionData,
 ]; 
Reply
Reply




Theme © iAndrew 2016 - Forum software by © MyBB