Welcome Guest, Not a member yet? Register   Sign In
Losing session data
#16

[eluser]KLODEnet di Stefano Surricchio[/eluser]
The right way to use the cookie, in order to maintain session data, is to set session and cookies related variables in the config.php file, like this:

Code:
$config['sess_cookie_name'] = 'name_of_session';
$config['sess_expiration'] = 0;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = FALSE;
$config['sess_table_name'] = 'ci_session';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = FALSE;
$config['sess_time_to_update'] = 300;

$config['cookie_prefix'] = "nameofcookie_";
$config['cookie_domain'] = ".nameofdomain.com";
$config['cookie_path']  = "/";
$config['cookie_secure'] = FALSE;

This works like a charm for me.


Best regards.


Messages In This Thread
Losing session data - by El Forum - 03-05-2010, 09:19 AM
Losing session data - by El Forum - 03-22-2010, 09:07 AM
Losing session data - by El Forum - 03-22-2010, 01:00 PM
Losing session data - by El Forum - 03-22-2010, 04:23 PM
Losing session data - by El Forum - 03-22-2010, 05:06 PM
Losing session data - by El Forum - 03-22-2010, 05:38 PM
Losing session data - by El Forum - 03-22-2010, 06:07 PM
Losing session data - by El Forum - 03-22-2010, 11:12 PM
Losing session data - by El Forum - 03-23-2010, 01:51 AM
Losing session data - by El Forum - 03-23-2010, 01:55 AM
Losing session data - by El Forum - 03-23-2010, 02:47 AM
Losing session data - by El Forum - 03-23-2010, 06:35 AM
Losing session data - by El Forum - 03-23-2010, 07:37 AM
Losing session data - by El Forum - 03-30-2010, 09:56 PM
Losing session data - by El Forum - 03-31-2010, 06:42 AM
Losing session data - by El Forum - 09-17-2012, 05:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB