Database error on user registration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • orangeade
    Senior Member
    • Aug 2011
    • 257
    • 4.2.X

    [Answered] Database error on user registration

    Hi, I get this when attempting a user registration (screenshot also attached).

    I've recently imported a phpBB database. Could that be something to do with the problem?

    Any ideas how to resolve this?

    Database error in vBulletin 4.1.5:

    Invalid SQL:
    INSERT INTO userfield
    (userid)
    VALUES
    (2875);

    MySQL Error : Duplicate entry '2875' for key 'PRIMARY'
    Error Number : 1062
    Request Date : Sunday, September 11th 2011 @ 01:53:13 PM
    Error Date : Sunday, September 11th 2011 @ 01:53:14 PM
    Script : http://62.233.104.149/register.php?do=addmember
    Referrer : http://62.233.104.149/register.php
    IP Address : 91.135.13.253
    Username : qweqwe
    Classname : vB_Database_MySQLi
    MySQL Version :
    Click image for larger version

Name:	error.gif
Views:	1
Size:	9.5 KB
ID:	3721838
    My vBulletin forum. Check it out!
    Apps: iPhone/iPad, Android
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    Try doing a repair/optimize on the userfield table.

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment

    • orangeade
      Senior Member
      • Aug 2011
      • 257
      • 4.2.X

      #3
      Originally posted by Lynne
      Try doing a repair/optimize on the userfield table.
      I just tried it. No luck
      My vBulletin forum. Check it out!
      Apps: iPhone/iPad, Android

      Comment

      • Lynne
        Former vBulletin Support
        • Oct 2004
        • 26255

        #4
        Sometimes you have to do this a couple of times until it says the table is OK. What did it say after you tried a repair on it?

        And how many rows are in that table? What is the highest userid? And what is the auto_increment set at? and how many rows in the user table and what is the highest userid and the auto_increment for that table?

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to vbulletin.org
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools <- awesome site for html/css help

        Comment

        • Wayne Luke
          vBulletin Technical Support Lead
          • Aug 2000
          • 73981

          #5
          On the Repair / Optimize page, at the bottom is another form... Fix Unique Indexes.


          Run that
          Translations provided by Google.

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

          Comment

          • orangeade
            Senior Member
            • Aug 2011
            • 257
            • 4.2.X

            #6
            Originally posted by Lynne
            Sometimes you have to do this a couple of times until it says the table is OK. What did it say after you tried a repair on it?
            Done it a few times. I always get the following:

            userfield Check Status: OK
            userfield Optimize Status: Table is already up to date


            Originally posted by Lynne
            And how many rows are in that table? What is the highest userid? And what is the auto_increment set at? and how many rows in the user table and what is the highest userid and the auto_increment for that table?
            I went to phpmyadmin to check this out. Is that correct?
            1) Highest userid seems to be 9526. It says there's a total of 9,525 rows
            2) Auto_increment? I don't know what it is an how to check what it's currently set at, sorry.

            Originally posted by Wayne Luke
            On the Repair / Optimize page, at the bottom is another form... Fix Unique Indexes.


            Run that
            Tried it, but no luck
            My vBulletin forum. Check it out!
            Apps: iPhone/iPad, Android

            Comment

            • Wayne Luke
              vBulletin Technical Support Lead
              • Aug 2000
              • 73981

              #7
              In phpMyAdmin, go to the table and then click the options tab at the top. You can see the next autoincrement value at the bottom. The one in your user table controls the other tables and needs to be higher than your highest userid.

              If you can't adjust it, then start a support ticket with phpMyAdmin and AdminCP access so we can look at it.
              Translations provided by Google.

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

              Comment

              • orangeade
                Senior Member
                • Aug 2011
                • 257
                • 4.2.X

                #8
                Originally posted by Wayne Luke
                In phpMyAdmin, go to the table and then click the options tab at the top. You can see the next autoincrement value at the bottom. The one in your user table controls the other tables and needs to be higher than your highest userid.

                If you can't adjust it, then start a support ticket with phpMyAdmin and AdminCP access so we can look at it.
                Hi, there's no options tab (see view below).
                Click image for larger version

Name:	userfield.jpg
Views:	1
Size:	101.4 KB
ID:	3685358
                My vBulletin forum. Check it out!
                Apps: iPhone/iPad, Android

                Comment

                • Wayne Luke
                  vBulletin Technical Support Lead
                  • Aug 2000
                  • 73981

                  #9
                  Sorry the Operations tab. The table you want to look at for the autoincrement is the user table, not userfield. userfield and usertextfield will use the value provided by the user table.
                  Translations provided by Google.

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

                  Comment

                  • orangeade
                    Senior Member
                    • Aug 2011
                    • 257
                    • 4.2.X

                    #10
                    OK! It was 2881, so I set it to 9550. All sorted. Thanks for the help.
                    My vBulletin forum. Check it out!
                    Apps: iPhone/iPad, Android

                    Comment

                    • Wayne Luke
                      vBulletin Technical Support Lead
                      • Aug 2000
                      • 73981

                      #11
                      Great. I am glad it is working now.
                      Translations provided by Google.

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

                      Comment

                      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                      Working...