views:

363

answers:

2

Why do i have to use some persistent-login module to make my users login into Drupal 6 for longer period of time.

Why changing php.ini or settings.php doesnt works ?

from a "webtools" I see my cookies being expired in next day, but after few hours it happend to log me out. This is like spontagenious action, no pattern to follow / predict.

why this "keep-alive" login exists in drupal ??

+1  A: 

Drupal overrides the internal php session save handler in include/bootstrap.ini and has some non standard session code there. Haven't followed it through though.

Beyond that Drupal's settings.php will override php.ini.

Daren Schwenke
+3  A: 

You do not have to use the persistent module to achieve longer log in periods. You can simply adjust the ini_set() calls for the session.* PHP settings in your Drupal instances settings.php file (especially session.cookie_lifetime and session.gc_maxlifetime).

If adjusting those does not work for you, you should ensure that your server configuration allows overriding them from PHP.
Also, Drupal uses the standard PHP session storage mechanisms - if there are other PHP apps running on the same server, they might interfere with your session lifetime settings, depending on storage path configurations. See point 2 in this answer for information on that.

The persistent login module aims to make the configuration easier, but especially adds more features, as e.g. allowing a general remember me option while still requiring reauthentication for sensitive operations (like changing the password) to minimize the risks associated with long login periods.

Check this article linked from the modules project page, as well as this article linked from there for some in depth explanations concerning the handling of persistent logins.

Henrik Opel

related questions