Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By joachim on
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
sessions?
Configure the lifetime of your sessions on the server so that they don't expire?
I've no idea how to do
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.
In your site's settings.php
In your site's settings.php file you can see:
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.
Stay logged in
If you'd like a module solution, you can try the Persistent Login module.
http://drupal.org/project/persistent_login