Drupal login/cookie issue

I've been battling a pesky problem with Drupal where when a user logs in they get no error message but get a login page again. The short version is that the user's session from their "anonymous" browsing isn't cleared so they continue to get the login form again. The solution, or at least the workaround for a quick fix, seems to be adding this line to the settings.php file for the site: 

ini_set('session.cookie_domain', '.example.com');

This may well be related to a previous issue.

Category: 

4 Comments

Same problem?

Hope this can help
http://nice3z.myfinejob.com/unable-login-drupal-access-denied

I've had the same issue pop up on a couple sites.

For me, it seemed tied to hosting. The sites that had the problem were all on the same host. Each site required a slightly different fix for the problem.
http://drupal.org/node/6696

Probably this one:

You're probably experiencing this bug:

http://drupal.org/node/56357

Nearly fixed…

Actually, the problem is that, for some server setups, the session cookie isn’t being set properly at all. So, on each page request, the user appears to be a new anonymous user.

I’ve been working on getting a fix for this added to Drupal 5.2 (the fix has already been added to Drupal 6.x.) http://drupal.org/node/56357