I have lots of test installations of Drupal on my localhost.

Every so often, I find I am logged out of one and have to log back in.

How can I change it so this never happens?

Comments

StephenRobinson’s picture

Configure the lifetime of your sessions on the server so that they don't expire?

joachim’s picture

I've no idea how to do that... googling 'mamp session lifetime' doesn't get me anything that looks likely. dsm($_SESSION); shows I have an empty array.

cog.rusty’s picture

In your site's settings.php file you can see:

ini_set('session.cookie_lifetime',  2000000);  // 2,000,000 sec = 3.3 weeks = 23 days

That is a PHP integer, which on most systems can go up to 2 billion sec (23,000 days). No more, because then it wraps around to negative values. If you live forever you will have to login again.

Drupalace-1’s picture

If you'd like a module solution, you can try the Persistent Login module.

http://drupal.org/project/persistent_login