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.

No votes yet

Comments

Jun
20
2007

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

Jun
20
2007

Probably this one:

You're probably experiencing this bug:

http://drupal.org/node/56357

Jun
20
2007

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

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Link to Amazon products with: [amazon product_id inline|full|thumbnail|datadescriptor]. Example: [amazon 1590597559 thumbnail] or [amazon 1590597559 author]. Details are on the Amazon module handbook page.
  • Twitter-style @usersnames are linked to their Twitter account pages.
  • Twitter-style #hashtags are linked to search.twitter.com.
  • Allowed HTML tags: <a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul><p> <img> <table> <tr> <td><strong><em><sup><div><fn><h1><h2><h3><h4><blockquote><img style="">
  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • You may insert videos with [video:URL]
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically. (Better URL filter.)
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options