I have a weird issue on a test server where I get constantly logged out. What could cause that?

1 Answer 1


A lot of different things can cause that, so there are several things to check. One common issue is not having the site direct traffic to either www.[sitename].com or [sitename].com - this causes users to have separate sessions for each version of the site. Solution here: Website saves separate sessions for "www.domain.com" and "domain.com"

Another possible issue is a misconfigured sites/default/settings.php file - this can happen if you copy the site from another location. Check uncommented lines pointing to urls other than your test location. I believe cookie domain can cause session problems if misconfigured.

Finally, since you mentioned that this is a test server, you might check that Drupal's MYSQL user has the correct permissions for its database. I've had strange things happen when it has some but not all of the necessary access permissions to the database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.