I added one statement to sync up session with client cookie, everything is ok.
setcookie($this->_name, session_id(), time()+$this->_lifetime, Cookie::$path, Cookie::$domain, Cookie::$secure, Cookie::$httponly);
in system\classes\Kohana\Session\Native.php#protected function _read($id = NULL)
kohana3.3.0 native session lifetime expired by incorrect calculation
-
27-06-2022 - |
質問
bootstrap.php:
Session::$default="native";
my session configure file:
return array(
'native' => array(
'name' => 'session',
'lifetime' => 10, // 10 secs
),
);
I found the calculation of expired time is time() - session_created_time > lifetime
, not time() - last_active_time > lifetime
. is anyone who could told me how to fix that?
解決
他のヒント
According to what I see in the Kohana's code, session['native']['lifetime'] is not working. I searched in the code for
ini_set('session.gc_maxlifetime', xxx)
and didnt find it. I had to put that line on my bootstrap.php
Can you tell me whether session['native']['lifetime'] is working or not?
所属していません StackOverflow