Problem with sessions

Hello

I have aplication which store some information in sessions(id,name,username, facebook picture, facebook id, facebook location…). my problem is that, when I close the browser information is lost, but only in part because id and name surveys but the other information losts

Thanks!

That’s by design: Sessions are kept alive through a session cookie. By default it’s called PHPSESSID and expires when you close your browser. So you’ll lose all session data when the browser is closed.

And what it’s the reason for survives id and name?

Are you sure, you store and retrive them from the session? Maybe you mix it up with Yii::app()->user->id and Yii::app()->user->name and use the “remember me” (restoreFromCookie) feature. That’s a different story then, because this feature uses another cookie, which usually has a longer lifetime.

Where i can see if i’m using restoreFromCookie feature??

Well, you should know, which mechanism you use to login to your site. If it’s the defautl Yii login page and you checke the “Rembember me” checkbox, then you’re using the feature.