[eluser]fancms[/eluser]
Currently I am using the default CI session class, and have it set to save the sessions in the database. Something I have noticed while working is that every time I refresh a page, a new session is entered into the database. When I echoed the default session vars (session_id, etc), it too changed with every page refresh.
These are my settings for the sessions and cookies:
Code:
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| If you use the Encryption class or the Sessions class with encryption
| enabled you MUST set an encryption key. See the user guide for info.
|
*/
$config['encryption_key'] = "<encryption key is here>";
/*
|--------------------------------------------------------------------------
| Session Variables
|--------------------------------------------------------------------------
|
| 'session_cookie_name' = the name you want for the cookie
| 'encrypt_sess_cookie' = TRUE/FALSE (boolean). Whether to encrypt the cookie
| 'session_expiration' = the number of SECONDS you want the session to last.
| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
|
*/
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'sessions';
$config['sess_match_ip'] = TRUE;
$config['sess_match_useragent'] = TRUE;
/*
|--------------------------------------------------------------------------
| Cookie Related Variables
|--------------------------------------------------------------------------
|
| 'cookie_prefix' = Set a prefix if you need to avoid collisions
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
| 'cookie_path' = Typically will be a forward slash
|
*/
$config['cookie_prefix'] = "";
$config['cookie_domain'] = ".";
$config['cookie_path'] = "/";
I am using XAMPP on Windows XP w/Apache 2.2.6, mySQL 5 and PHP 5.2
I'm a bit confused...did I set something wrong or is this supposed to be happening? I'm concerned that when I develop my user auth library for my project that the users will have problems staying logged in, among other things.