What Is The Default Time And How To Se The The Time In Yii?


   Yii friends

            I am using Yii::app()->session['sso']

this to store the value in session but I didn’t get the idea what is the default time that store it and how give manually time to session to store the data…or is there any way to set the time for the session for above.



I don’t understand what you are asking but you can add a session like this: http://www.yiiframework.com/doc/api/1.1/CHttpSession#add-detail

Yii::app()->session->add('sso', 'ssoValue');

and then get the session value with: http://www.yiiframework.com/doc/api/1.1/CHttpSession#get-detail


Are you asking how to set the time limit on a session? If so, you’re sort of missing the point in what a session is. If you want to expire certain values, you have to do it manually (as in write a function/procedure).

Oh if you are asking about session timeout look here: http://www.yiiframework.com/doc/api/1.1/CHttpSession#timeout-detail You could define your session life in your config/main.php

I stand corrected.

THank you everyone for your reply…hope It will be beneficial for me.