php - Yii 1.1x logs out the user before session timeout -
i'm using yii 1.1.13 , despite session timeout set 1 day (session.gc_maxlifetime = 86400
in php.ini) yii logs out user after ~24 mins. doesn't redirect login page, when user navigate page.
i set these in login function:
$duration = yii::app()->getsession()->gettimeout(); yii::app()->user->login($this->_identity,$duration);
(the yii::app()->getsession()->gettimeout()
call gives right time, 86400)
i set cookie lifetime value:
yii::app()->request->cookies['phpsessid']->expire = yii::app()->getsession()->gettimeout();
but bug still appears.
thank in advance helping answers.
i needed set in main.php:
'session' => array( 'timeout' => 86400, 'cookieparams' => array( 'lifetime' => 86400, ), )
it keeps alive both session , cookie if somehow given lower value.
Comments
Post a Comment