Welcome Guest, Not a member yet? Register   Sign In
ci_sessions set_cookie() printing to screen
#1

[eluser]smatakajr[/eluser]
Hi,

I found a bug with the sessions, apparently when you call

set_userdata() and that calls sess_write()

When you have this config

$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_encrypt_cookie'] = TRUE; <--
$config['sess_use_database'] = true;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;

When the sess_write calls the set_cookie() function
it prints the encrypted cookie code on the screen and exits

When you set this config to False

$config['sess_encrypt_cookie'] = FALSE; <--

This behavior does not occur. Also if you leave
these configs blank

$config['cookie_prefix'] = "";
$config['cookie_domain'] = "";
$config['cookie_path'] = "";

In conjunction with the encrypt cookie call
it produces the same behavior.

I didnt get to fix that acctaul code just changed the
config settings. But i noticed you call set_cookie
explicitly in the sess_write() function. Maybee
if you encapsulate this within another method
and do a check for failure with @ suppression
maybee the code will not just exit?

Thanks
Rick


Messages In This Thread
ci_sessions set_cookie() printing to screen - by El Forum - 02-11-2009, 10:13 AM
ci_sessions set_cookie() printing to screen - by El Forum - 02-11-2009, 03:23 PM
ci_sessions set_cookie() printing to screen - by El Forum - 02-11-2009, 03:37 PM
ci_sessions set_cookie() printing to screen - by El Forum - 02-11-2009, 03:38 PM
ci_sessions set_cookie() printing to screen - by El Forum - 02-11-2009, 03:42 PM
ci_sessions set_cookie() printing to screen - by El Forum - 02-12-2009, 08:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB