One of my clients' irritations is being logged out of the control panel when he has left his session idle for a few hours. How can I prevent this?
If for some reason you need to use sessions, you can change the session time with a config variable
$config['cp_session_ttl'] = 86400; // Keep admins logged in for one day!
Try changing the Control Panel Session type to Cookies Only: http://ellislab.com/expressionengine/user-guide/cp/admin/security_settings.html
I use the following code within the config.php file that is located at /system/expressionengine/config/config.php.
And you have to set "cookies" in your security preferences.
// Cookie Settings $config['cookie_prefix'] = ""; $config['cookie_domain'] = '.yourdomain.com'; $config['admin_session_type'] = 'c'; // if c does not work try 's' (session) // logout time controlling: it's best to set only cookies in security prefs // be sure to set cookies domain as well $config['user_session_ttl'] = 14400; // user session $config['cp_session_ttl'] = 14400; // control panel session
This works quite well! Cheers outline4
I'd prefer to just up vote MediaGirl's comment, but since I don't have enought rep yet to do that I'll just say that we did the two things recommended here: 1) switch to cookies only and 2) up the cp_session_ttl and that seems to have worked best for us. Probably didn't need to set both, but it worked regardless.
John D Wells mentioned this on his site, not me, but "as of EE 2.2.somethingorother, there are two new hidden configuration variables that allow you to control the session length of both CP users and front-end visitors. See User Session Length and Control Panel Session Length for more."
Here's a link to the "Hidden Configuration Variables" page: http://ellislab.com/expressionengine/user-guide/general/hidden_configuration_variables.html
This is somewhat tangential, but I highly recommend your client use something like 1password to manage credentials instead of staying logged in for a long time,