User is logged out before session timeout

I’m using Yii 1.1.13 and despite the session timeout is set to 1 day (session.gc_maxlifetime = 86400 in php.ini) Yii logs out the user after ~24 mins. It doesn’t even redirect to the login page, only when the user would navigate to another page.

I set these in the login function:

    $duration = Yii::app()->getSession()->getTimeout();


(the Yii::app()->getSession()->getTimeout() call gives back the right time, that is 86400)

I also set the cookie lifetime to this value:

Yii::app()->request->cookies['PHPSESSID']->expire = Yii::app()->getSession()->getTimeout();

but the bug still appears.

Thank you in advance for your helping answers.