New registered users are getting an old user's account

droople - February 3, 2007 - 08:51

I have just noticed that new users on my site are being redirected to a particular older user's account when they register.

e.g if I register as George, with a totally different e-mail address, when I login or i try to edit "My account" I am being redirected to a user called eg: Stephen

Also upon registration I get this error message

    * user warning: Duplicate entry '141' for key 1 query: user_save INSERT INTO users (name, mail, pass, init, status, created, uid) VALUES ('londonboy', 'myemailadd@hotmail.co.uk', '201bc94d84433765fb26e7e3c3e6b8f6', 'myemailadd@hotmail.co.uk', 1, 1170490600, 141) in public_html/sitename/includes/database.mysql.inc on line 121.
    * user warning: Duplicate entry '141-1' for key 1 query: user_save INSERT INTO buddylist (received, uid, buddy, timestamp) VALUES (1, 141, 1, 1170490601) in public_html/sitename/includes/database.mysql.inc on line 121.

Also the site will not go into Offline mode: When I try to set the site to offline, i get the following errors message:

* user warning: Table 'databse_drpl6.variable' doesn't exist query: db_lock_table LOCK TABLES variable WRITE in /public_html/sitename/includes/database.mysql.inc on line 121.
    * user warning: Table 'databasedrpl6.variable' doesn't exist query: variable_set DELETE FROM variable WHERE name = 'site_name' in /public_html/sitename/includes/database.mysql.inc on line 121.
    * user warning: Table 'database_drpl6.variable' doesn't exist query: variable_set INSERT INTO variable (name, value) VALUES ('site_name', 's:26:\"MYSITE NAME\";') in /public_html/sitename/includes/database.mysql.inc on line 121.
    * user warning: Table 'magazim_drpl6.variable' doesn't exist query: db_lock_table LOCK TABLES variable WRITE in /home/magazim/public_html/sitename/includes/database.mysql.inc on line 121.
    .

Anyone help please!!

check out sequences

neural - February 3, 2007 - 10:02

I think the problem comes from the sequences table.

This table has a user_ids field on which there is a number as value.

This number must be higher than your last registered user uid.

Check out the users table and look what's the id of the latest user.

Then go back to the sequences table and increase the user_ids' value to something higher than the latest user id.

Hope I helped.

Thanks::::::But lost

droople - February 4, 2007 - 00:16

Here is a screenshot of what's on my sequences table

SCREENSHOT HERE

the user count stuck on 194 users. I think I have lost 20 or so users over the last 2 weeks when I hadnt noticed this problem

Could you have a look at the screenshot and tell me which numbers to change.

Thank you

I can't see the data on the

neural - February 4, 2007 - 22:50

I can't see the data on the screenshot because you gave me the structure view, to see the data, you have to click on "browse" from there.

Once you clicked on browse you'll look at the row which name is something like user_ids or users, remember the digit value of this row (value1).

Then you have to go check the users table and look in your recordings (with "browse") for the highest value on the user_id field (value2).

Value1 must be equal or higher than value2. If it isn't, drupal will try to create users with ids that are already assigned, and usually outputs "duplicate entry" errors.

This is usual when you have renamed or prefixed your database tables after having installed and used drupal (posting content or adding users).

Thanks for the explanation:::now next is

droople - February 5, 2007 - 01:43

I have updated that:

Value1 was 142
Value2 was 193

so I edited 142 to 194, and indeed the user count is now increasing, however. When I registered as new user, I couldn't get any template. but when I login with an old username like "user1" or even some user name registered prior to the above problem, all is showing well

I also get this error now

    * user warning: Table 'databse_drpl6.variable' doesn't exist query: LOCK TABLES variable WRITE in public_html/sitename/includes/database.mysql.inc on line 121.
    * user warning: Table 'database_drpl6.variable' doesn't exist query: DELETE FROM variable WHERE name = 'drupal_private_key' in public_html/sitename/includes/database.mysql.inc on line 121.
    * user warning: Table 'database_drpl6.variable' doesn't exist query: INSERT INTO variable (name, value) VALUES ('drupal_private_key', 'i:723655074;') in public_html/sitename/includes/database.mysql.inc on line 121.
    * Validation error, please try again. If this error persists, please contact the site administrator.

What could be the explanation now?

thank you

Thanks...

themoors - May 14, 2007 - 10:13

Thanks, I was having a similar problem and your solution worked. My error was slightly different though, this might explain why it didn't work for droople.

It was:

Duplicate entry '3' for key 1 query: INSERT INTO users (name, mail, pass, init, status, uid, created) VALUES ('testing1234', 'admin@life-eats-itself.com', 'c5c0660ed4ff5740c4f589a0f018c01e', 'admin@life-eats-itself.com', 0, 3, 1179136480) in /home/hgi/public_html/hginc/includes/database.mysql.inc on line 172.

similar problem

bill18 - May 7, 2007 - 12:24

I encountered similar problem when a user want to access

http://www.etousu.com/node/416?page=23

I have the error msg:

在/home/nuangle/public_html/etousu/includes/database.mysql.inc的第121行: Duplicate entry 'AM80hpJbhzEnmCTpr4WBHlFEUTH6c42p' for key 1 query: INSERT INTO sessions (sid, uid, cache, hostname, session, timestamp) VALUES ('AM80hpJbhzEnmCTpr4WBHlFEUTH6c42pe3PmI96RPhO2pOgjWflE4aOYiicED7iM', 0, 0, '58.245.235.142', '', 1178529746) 。

 
 

Drupal is a registered trademark of Dries Buytaert.