The last error to fix!

I don't know what to fix.

This is my error:

Duplicate entry '4' for key 1 query: INSERT INTO users (name, mail, pass, init, status, created, uid) VALUES ('rivena', 'mystavash@something.com', '9d10ee70f7118f39470ddadb5', 'mystavash@something.com', 1, 1147798805, 4) in /www/includes/database.mysql.inc on line 120.

I almost wonder why it bothers talking about line 120, it never has anything to do with anything, it just generates the error. ;p

What I did was I pretty much manually imported several users into the database. From PHPnuke, but that hardly matters, I think. However, somehow Drupal is not recognizing that new users have been added, and keeps trying to write over them. Which it can't do, thankfully. I've seen this error in lots of forum posts, but always for this type of content or that, and the answer has been modify something in the sequence table, but this is for USERS, so I didn't think the solution would be the same.

Any help would be appreciated!

Anisa.

Comments

bs’s picture

It seems to me that e-mail id is already exists. That is why Drupal warning you for duplicate entry?

rivena’s picture

It's the UID (user id) that already exists; because I imported several users, but Drupal isn't updating the UID on the website... I'll take a look at the docs and see where it gets the UID from.

Anisa.

-----------------------------------------------------------
Kindness builds stronger bonds than necessity.

www.animecards.org - 16,000 card scans and counting!
-----------------------------------------------------------

rivena’s picture

Fool I was, I mistook two tables, and I browsed the wrong table... I was looking in sessions, when I should have been looking in sequences. The fix is to update the sequences table (uid) to a number that is greater than the biggest uid in your user table.

Anisa.

-----------------------------------------------------------
Kindness builds stronger bonds than necessity.

www.animecards.org - 16,000 card scans and counting!
-----------------------------------------------------------

rivena’s picture

I'm on the docs team, because I have absolutely no idea what I am doing, and apparently this is useful when writing docs. ;)

I created a handbook page on this error:
http://drupal.org/node/69722

Please let me know if you have found it useful, if there are mistakes, or if I should add something.

Anisa.

-----------------------------------------------------------
Kindness builds stronger bonds than necessity.

www.animecards.org - 18,000 card scans and counting!
-----------------------------------------------------------