CodeIgniter Forums
Session Timeout - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Session Timeout (/showthread.php?tid=60947)



Session Timeout - El Forum - 08-07-2014

[eluser]design132[/eluser]
It seems as though I've tried numerous things but my clients keep getting logged out of the site anywhere between 2 and 4 hours. I've tried overriding the settings in our config file to no avail. Is there a plugin that can help with this?


Session Timeout - El Forum - 08-07-2014

[eluser]CroNiX[/eluser]
Are you using ajax requests?


Session Timeout - El Forum - 08-07-2014

[eluser]design132[/eluser]
I was using cookies as the session and then doing this in my config file:

Code:
$config['is_system_on'] = "y";
$config['allow_extensions'] = "y";
$config['enable_db_caching'] = 'n';
$config['enable_sql_caching'] = 'n';
$config['disable_tag_caching'] = 'y';
$config['cookie_prefix'] = "cattle_";
$config['multiple_sites_enabled'] = 'n';
$config['enable_online_user_tracking'] = 'y';
$config['enable_hit_tracking'] = 'y';
$config['enable_entry_view_tracking'] = 'y';
$config['cookie_domain'] = '.mysite';
$config['admin_session_type'] = 's';
$config['secure_forms'] = 'n';

$config['dynamic_tracking_disabling'] = '';
$config['server_offset'] = "-1";  


$config['user_session_ttl'] = 11114400; // user session
$config['cp_session_ttl'] = 11114400;  // control panel session


$config['tz_country'] = "us";
$config['cookie_httponly'] = "y";
$config['cp_session_type'] = "s";

BTW, not sure what may have changed because prior to 2.8.0 it seems this was not a problem, clients could stay logged in all day long. Kinda odd. Thank you so much for answering me so fast!

Is it possible that I have some settings overriding others?


Session Timeout - El Forum - 08-07-2014

[eluser]CroNiX[/eluser]
None of that has to do with native CI Session settings (see the bottom of this page for the available CI session parameters)

Are you sure you are talking about CI? You mention version 2.8.0, but CI's most current released version is 2.2. Is it ExpressionEngine?


Session Timeout - El Forum - 08-07-2014

[eluser]design132[/eluser]
Again, thank you so much for taking some of your time to help me figure this out. I am running ExpressionEngine v2.8.1 - Build Date: 2014031.

But I just saw this just now:
Changed in version 2.8: Replaced user_session_ttl and cp_session_ttl. If either override had the value 0 in config.php prior to the 2.8 update, they were replaced with $config['expire_session_on_browser_close'] = 'y'; during the update.

So I'm wondering if that is what's causing them to be logged out all the time (keep in mind they're not closing their browsers... it's more of an idle logout issue).


Session Timeout - El Forum - 08-07-2014

[eluser]CroNiX[/eluser]
It could be. Most users in the Codeigniter forum know nothing about ExpressionEngine. There are ExpressionEngine specific forums that would be a lot better for this question, so EE users/developers can answer you.


Session Timeout - El Forum - 08-07-2014

[eluser]design132[/eluser]
omg, i'm so sorry, i thougtht this was that forum... they look identical. Sorry about that and thank you.

///EDIT///

Not sure how to get to EE only forums... any forum link on the Expression Engine site just links right back to this forum... can you help me?


Session Timeout - El Forum - 08-07-2014

[eluser]CroNiX[/eluser]
Click on Forum Home in the breadcrumbs at the top of the page.
Look for the ExpressionEngine 2 Section (2nd section down) and click on the Development & Programming link.

That takes you back here? I just tried in 3 browsers and it wen't to the correct forum.


Session Timeout - El Forum - 08-07-2014

[eluser]design132[/eluser]
Thanks!!