[drupal-support] Strange Session Behavior

John Goerzen jgoerzen at complete.org
Tue Apr 19 14:17:14 UTC 2005


I've had a lot of weird experiences with sessions this week.

They sometimes seem to time out in mere seconds.  It's even not hard to
see a page, perhaps a comment reply page, that lists my logged-in name
under "Your name", shows the administer menu under navigation (though
without my username), yet also shows the user login box as if I'm not
logged in -- all on a single page.  I am baffled, and I've seen some
comments left by people other than me show up as if they were left by
me.  I also saw my wife's session suddely switch from her username to
mine, in the middle of working around on the site.

Here are the things I've tried:

 * Deleteing everything in the sessions table
 * Upgrading from Drupal 4.5.1 to 4.6.0
 * Disabling cache support in Settings
 * Clearing browser cache and cookies
 * Enabling PHP entropy for session IDs

This whole problem started after I:

 * Disabled the Spam module
 * Enabled the Captcha module
 * Used a MySQL query to remove about 2500 spam comments from the
   comments table, dropped the spam_* tables, then followed the
   instructions on drupal.org for forcing a rebuild of the search
   index
 * Applied the small Captha patch to the comment module

The problem most frequently occurs when I go to leave a comment.  It's
100% reproducible when I pull up the "leave a comment" page.  However, I
believe it did occur in other circumstances before, though I can't
reproduce them now.

Here's another weird thing.  I host four drupal sites on this machine.
All four exhibited the problem.  Now one is working fine, but another is
still problematic (I haven't tested the other two).  I can't think what
may have caused the one to become "normal" again.

I am using all of the Drupal defaults for the PHP session-handling
parameters.

Thanks,
John




More information about the drupal-support mailing list