I am having major problems with my Drupal installation. It seems as if the session id does not get updated for some reason.
So I keep getting the error:
Fatal error: Duplicate entry '3b351a35afa86f99f6cb362858aefcc1' for key 1 query: INSERT INTO sessions (sid, uid, hostname, timestamp) VALUES ('3b351a35afa86f99f6cb362858aefcc1', 0, 'xxx.xxx.xxx.xxx', 1129949930) in /mypath/opentravelinfo.com/includes/database.mysql.inc on line 66

(i replaced my path with /mypath and my ip with xxx.xxx.xxx.xxx).

Anyways, in desperation I emptied the whole session table which restored login temporarily but when I logged out, it gave me the same session id again ('3b351a35afa86f99f6cb362858aefcc1') and gave me the same stupid error again.

What does this mean?

Andre

Comments

Michelle’s picture

When I had this happen, it was because my user 0 had disappeared. Drupal doesn't like users being deleted, I guess. I deleted a bunch and it messed things up. Make sure you have a user id 0 in the user table.

bi11i’s picture

this problem started for me when i created my first post and promoted it to the front page. before this, everything worked great, now i'm getting the same error.

squaretone’s picture

I had the same problem when my user 0 dissapeared. I'm not sure why mine dissapeared. I had just created an additional user a few hours before this all happened but nothing much else changed. Any idea why your user 0 went bye bye?

Eric Lawrence
Developer/UX Designer
http://squaretone.com

sangamreddi’s picture

I ahve no ideas why it has been disappeared. You can use protect critical id's module. So this wont repeat in future.

Sunny                      
www.gleez.com | www.sandeepone.com

alwizbme’s picture

hi there..

My site with Drupal installed has been quite wondeful for many months now, I started to promoted my site with friends and families and they started using it and getting used with drupal. But suddently today I encountered with the same above mentioned problems. If I were to clear my cookies in my browser, I can access the frontpage but that's about it.

I have tried many things, clearing the sessions, check the user 0, but still the problem persisted. What exactly is happening, does anyone knows the solution yet... please help.

Alwi.

andre75’s picture

I found it here on Drupal. It turns out I was really missing user 0. I simply executed the MySQL statement that someone posted on drupal.org and it started working again.
At first I assumed it was unrelated but then it turned out I was really missin user 0 (which I never deleted myself, it just dissappeared)

Andre

-------------------------------------------------
http://www.opentravelinfo.com
http://www.aguntherphotography.com

sangamreddi’s picture

Hi,

When i got this error, i emptied the sessions table and error didn't go. Then

I selected all the tables using PHPMYadmin and click repair. That's it everything if fine.

If you're using cpanel, u cna repair the tables from the cpanel mysql.

Sunny
www.gleez.com

hjuan99’s picture

The user 0 is almost always the cause of this problem.

See this blog post to fix it:

http://devbee.com/all_important_user_zero

My blog

gaslkn’s picture

Probably, this is related to the "zero value in AUTO_INCREMENT field" issue:
Drupal “user 0″ vs MySQL autoincrement