I’m using CI session, I’ve modded the setcookie to set expiration time to 0 to create(expire upon closing of browser) session cookie.
Somehow the session cookie is very flaky. I’ve tested on my computer with IE6/7 Firefox 1.5/2.0 and the latest Opera. And the session works.
But I have several other users reported being redirected to login page after signing into the system.
User login -> check auth, set cookie, and display secured home page -> user request another secured page—> user fowarded to login page as if the cookie was not set.
My config.php
/*
|—————————————————————————————————————
| 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’] = 7200;
$config[‘sess_encrypt_cookie’] = TRUE;
$config[‘sess_use_database’] = FALSE;
$config[‘sess_table_name’] = ‘’;
$config[‘sess_match_ip’] = TRUE;
$config[‘sess_match_useragent’] = FALSE;
/*
|—————————————————————————————————————
| 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’] = “.mydomain.com”;
$config[‘cookie_path’] = “/”;
/*
|—————————————————————————————————————
| Global XSS Filtering
|—————————————————————————————————————
|
| Determines whether the XSS filter is always active when GET, POST or
| COOKIE data is encountered
|
*/
$config[‘global_xss_filtering’] = TRUE;
Can anyone help?
