Welcome Guest, Not a member yet? Register   Sign In
Problem with CI sessions
#1

[eluser]Unknown[/eluser]
I just got started with using CodeIgniter sessions and everything is going great. I've configured sessions to be encrypted and also for them to be stored in a database. However, there's one major problem.

I've noticed that multiple sessions are created in the session table (in the database) for each user. This is very odd because my web application is currently running on localhost, so no one but me is able to access it. But even with only one user, multiple sessions are being created in the table. What's even stranger is that when new rows are added to the session table, my current session ID (stored in the cookie) does not change. What could be the cause of this?


Also, one more question. If I store user data from sessions in the database, is it also stored in the cookie?
#2

[eluser]tomcode[/eluser]
I guess the multiple table entries are created because the session data is encrypted, try without encryption whether You still have multiple entries.

Using the database, I've found that user defined data is not stored in the cookie, but a default data set :

- session_id
- ip_address
- last_activity

For testing cookies I use Firefox with the Web Developer add on, it lets You see and edit cookies.




Theme © iAndrew 2016 - Forum software by © MyBB