Announcement

Collapse
No announcement yet.

Database error during user registration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] Database error during user registration

    This has been happening since I installed vBulletin 4.0.7 and it continues after I just upgraded to v4.0.8. We are using MySQL 5.1.47-community.

    Whenever a new user registers the account is created and then the user gets an ugly database error page (Database error. The forum has encountered a problem). This happens every time, without fail, and I have no idea why.

    As administrator I receive an email with the error, which looks like this:

    Database error in vBulletin 4.0.8:
    Invalid SQL:
    INSERT INTO userfield
    (userid)
    VALUES
    (18);
    MySQL Error : Duplicate entry '18' for key 'PRIMARY'
    Error Number : 1062
    Request Date : Wednesday, November 10th 2010 @ 05:13:00 PM
    Error Date : Wednesday, November 10th 2010 @ 05:13:01 PM
    Script : http://my-host/forums/register.php?do=addmember
    Referrer : http://my-host/forums/register.php
    IP Address : xxx.xxx.xx.xxx
    Username : Test1
    Classname : vB_Database
    MySQL Version :

    Can someone please help me to fix this problem? Thankn you.

  • #2
    You already have a user with that ID. Go into the Admin CP and scroll down to Maintenance. Select Update Counters and run the Fix Broken User Profiles counter.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      Thanks for the suggestion but that did not correct the problem. This is basically a fresh database with only a few users in it. The highest userid in the user table is 18. I just did a another test registration. I see the account was created with a userid of 19 but I still got the database error.

      Now that I look at it more closely the error occurs when adding data to the table userfield, not user. Is that for user attributes? There are 302 records in that table, starting with userid 1 up to 312. Where would those have come from on a fresh install?

      Database error in vBulletin 4.0.8:
      Invalid SQL:
      INSERT INTO userfield
      (userid)
      VALUES
      (19);
      MySQL Error : Duplicate entry '19' for key 'PRIMARY'
      Error Number : 1062
      Request Date : Wednesday, November 10th 2010 @ 08:24:25 PM
      Error Date : Wednesday, November 10th 2010 @ 08:24:28 PM
      Script : http://hostname/forums/register.php?do=addmember
      Referrer : http://hostname/forums/register.php?do=addmember
      IP Address : xxx.xxx.xxx.xxx
      Username : test2
      Classname : vB_Database
      MySQL Version :

      Comment


      • #4
        After more investigation I found that there were 302 records in both the userfield and usertextfield tables. I deleted all records with a userid greater than the max userid in the user table and that seems to have fixed the problem. I can now register without error. I just wish I knew how all the extra records were created.

        Comment


        • #5
          I had the same problem. Deleting all the extra records resolved it for me, but like you I don't know where they came from.

          Thank you mmongeau for providing the detail that helped me solve this!

          Comment

          Related Topics

          Collapse

          Working...
          X