SESSION dies when closing browser

Started by Maceman, August 31, 2008, 04:30:53 PM

Previous topic - Next topic

Maceman

I am using this to grab the user's id from the session on my non-forum pages:

require_once("/home/user/public_html/forum/SSI.php");
loadSession();


It works fine until the user closes their browser. Once they open their browser again, they are no longer logged in to the non-forum pages.

What do I do?

[SiNaN]

Why do you call loadSession(), SSI does that already for you.
Former SMF Core Developer | My Mods | SimplePortal

Maceman


[SiNaN]

Unforunately I'm not good with sessions. But let's try this;

Admin CP >> Server Settings >> Feature Configuration

Enable local storage of cookies: unchecked
Use subdomain independent cookies: checked

Are they set like this?
Former SMF Core Developer | My Mods | SimplePortal

Maceman

They were set to the opposite settings as those. I switched it to those settings and it still doesn't work right.

Maceman

I'll add that I am using $_SESSION['uid'] to get the logged in user's id. It works until they close the browser. Is there a different session variable to use?

[SiNaN]

Unfortunately I'm not good with sessions. Do you get the same on forum or is it just SSI.php? And where and how do you use $_SESSION['uid']?
Former SMF Core Developer | My Mods | SimplePortal

Advertisement: