Welcome Guest, Not a member yet? Register   Sign In
Session timing out intermittently
#11

[eluser]bikuta[/eluser]
What do you mean? before or after?
#12

[eluser]indocoder[/eluser]
I think that part of the code always return TRUE, so check again value of your $this->session->userdata('last_activity') before that "if"
#13

[eluser]bikuta[/eluser]
Yea that may be the case, but it's quite hard to test, since it works here on my machine, but on other machines it may or may not work.

Would there be a better way to make sure it times out after being idle for 1 hour?
#14

[eluser]Steve Grant[/eluser]
If it's an issue being experienced by end users, ask them what their browser security settings are set to.

The CI Session class will only work if cookies are enabled. If they're disabled, you'll need to write your own library (or use one of the many others available) to implement the native PHP session class.
#15

[eluser]bikuta[/eluser]
Now I'm also getting the issue where another user seems to be getting the session data from another user. i.e., the sessions are getting mixed up.

User A logs in and shows logged in as user A, however when navigating to another page it thinks it's logged in as User B.

How can this be if the cookies are stored locally?
#16

[eluser]bikuta[/eluser]
what browser settings are required to use the CI Session library?
#17

[eluser]Steve Grant[/eluser]
[quote author="bikuta" date="1216118467"]what browser settings are required to use the CI Session library?[/quote]
Cookies need to be enabled. That is all Smile
#18

[eluser]bikuta[/eluser]
Would it be possible that cookies get blocked by a firewall or proxy?

Apart from the browser not being configured correctly, what other factors could contribute to the session library not working.
#19

[eluser]Rick Jolly[/eluser]
I noticed an underscore in your session name. Session names should be alphanumeric only. Maybe worth a try to change it.

Also, I wouldn't match IP addresses unless you're sure the IP won't change.
#20

[eluser]thecancerus[/eluser]
i am having similar problem, all i have figure out till now is that users with whom this problem is happening, their session data is not getting stored.

While when i use their user details, i can log in and work perfectly absolutely no issues.

We had the user try logging with low security settings to ensure that cookies are being accepted, but it did not solved the issue.




Theme © iAndrew 2016 - Forum software by © MyBB