donjakobo/A3M

I am being logged out, a session problem?

Closed this issue · 7 comments

I am using the site as an admin and out of a sudden while browsing the site, I found that I've been logged out and redirected to the login page eventhough I've set $config['sess_expiration'] to 0, it's still happening randomly and I don'te seem to be able to repeat the steps. Anyone is facing the same problem? I am using CI version 2.1.4

Are you setting your cookie to a specific domain? Also are you using cookies or PHP sessions? Need more detail please.

No, these are the values I have:

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

What browser are you using? Also I recall seeing something about underscores in domain names: http://stackoverflow.com/questions/794243/internet-explorer-ignores-cookies-on-some-domains-cannot-read-or-set-cookies

Have you inspected if your cookie expires or clears when you log out? could be something in your code destroying session, etc; Its really hard to tell here. I would suggest going to StackOverflow and tagging your post with codeigniter-a3m tag

I am using Chrome, but underscores can't be used in domain names, not sure what that means? I will watch the cookie more closely when it happens. Is it crucial to set the domain name in $config['cookie_domain'] = '';?

@profitable any update here?

@profitable I have not encountered this problem in the 2-dev branch.
Let us know if you still have problem, otherwise we will have to close this.

Closing for lack of response.