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?
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)