Good day everyone,
I have trouble using CHttpSession::timeout. Using Yii::app()->getSession()->getTimeout() will give out 1440 as default or my defined value. But after the given time, session didn’t expire.
I set up this client script to make a Ajax request to check if session is still alive after timeout limit. Server will check if session[‘user_id’] still exists and return true or false. Defining CHttpSession as session class and server will return true even we have gone passed the timeout limit. When I use CDbHttpSession, session expires as I wanted.
Can anybody help me explain why CHttpSession doesn’t expire after timeout limit while CDbHttpSession does? It’s just very strange.
'session' => array(
'class' =>'CHttpSession',
),
'session' => array(
'class' =>'CDbHttpSession',
),
Regards,
Hieu