Welcome Guest, Not a member yet? Register   Sign In
Sessions when using database problem.
#1

[eluser]Brad Martin[/eluser]
Hey Guys,

Got a problem with CI sessions.

First of all started with a fresh copy of CI and all that jazz!

setup my database settings in config/database.php & then edited the following in config/config.php to utilize sessions.

Code:
Line 228:  $config['encryption_key'] = '00-development-key';

The session class is being loaded by config/autoload.php

Now everything works as it should i can save user data and then re-call it either on the same page or any other page after its set however as soon as i turn the ci_sessions use database:

Code:
Line 255:  $config['sess_use_database'] = TRUE;

When its enabled its seems like codeigniter is creating a new session or something everytime the sessions class is loaded (In my case on every page load).

Im not exactly sure how CI sessions are surpose to work but the database table was a record with a new session id everytime the class is loads.





Theme © iAndrew 2016 - Forum software by © MyBB