Session Expire And Secure Cookie Problem


  1. I already finished my member area, but session timeout will not work.

then i added this code in config/main.php

'session' => array(

            'class' => 'CDbHttpSession',

            'timeout' => 1440,

            'cookieParams' => array(

				//'path' => '/',

				//'domain' => '',

				'httpOnly' => true,

				'secure' => false,



now my session problem is ok, but it should be add in main?? without that, session expire will not work?

  1. second question is that, when i change :

'secure' => true,

then my login will not work !!!

maziar you can pass the duration to your Yii::app()->user->login() method

thank you , i know that, but i am asking , by default in Yii there is no automatic session expire?

alirz , why in cookieParams when i change it to

'secure' => true,

my cookie will not work?

I think you need to read this it says if secure is enabled it send cookie over https

and you are using database session store