Welcome Guest, Not a member yet? Register   Sign In
What's Wrong With My Sessions?
#11

[eluser]WanWizard[/eluser]
Where is your session library loaded, when you call user_context()?

Have you checked if the session cookie is actually created in the browser? What is the cookie_path and cookie_domain set to? And I think you should remove the dot from the cookie_name.

I also see you don't use database sessions. In that case the data is stored in the cookie as well, and there isn't much room in a cookie. If it gets to big, it will be trucated by the browser, which invalidates the cookie and you loose your session.
#12

[eluser]ShoeLace1291[/eluser]
When i call the user_context function, i use $member = $this->mnember->user_context() and then for example $member['id']. I changed the cookie name but that didn't fix anything.

I also enabled database storage for the sessions. When I logged in with my form, it did save the session to the database, but the user data column was empty for my row.
#13

[eluser]InsiteFX[/eluser]
Did you try to autloading the session library?

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB