Forum database error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • -martin-
    Member
    • Feb 2010
    • 47
    • 4.2.x

    [Forum] Forum database error

    Hello,

    suddenly I realized there is some kind of database error in my vbulletin 4.2.1 forum it's happening on all pages, including forum index.

    I didn't changed anything that could cause the error and i doubt that hosting did changed something without sending some notification.

    How can I get more information about the sql error because all I see is just
    The XXXXXX FORUM database has encountered a problem.

    Please try the following:
    • Load the page again by clicking the refresh button in your web browser.
    • Open the XXXXXX home page, then try to open another page.
    • Click the Back button to try another link.
    The XXXXXX forum technical staff have been notified of the error, though you may contact them if the problem persists.
    We apologise for any inconvenience.
  • -martin-
    Member
    • Feb 2010
    • 47
    • 4.2.x

    #2
    database login works, I downloaded whole base to sql file and set it on my localhost but still I get the error an all pages, after typing login data on admincp index page , action login also causing the same error

    Comment

    • Zachery
      Former vBulletin Support
      • Jul 2002
      • 59097

      #3
      Enable debug mode in the config file, and also make sure the techemail is set to a valid email address.

      Comment

      • -martin-
        Member
        • Feb 2010
        • 47
        • 4.2.x

        #4
        Thanks Zachery, I edited includes/config.php and added the following line under <?php

        Code:
        $config['Misc']['debug'] = true;
        I also put my gmail email address to

        Code:
        $config['Database']['technicalemail'] =' ' ;
        line.

        Still I get no additional info about the error.

        Comment

        • Zachery
          Former vBulletin Support
          • Jul 2002
          • 59097

          #5
          Right click and view the source of the page. Also make sure debug mode isn't being shut off further down the page.

          Comment

          • -martin-
            Member
            • Feb 2010
            • 47
            • 4.2.x

            #6
            In the source it says:

            Code:
             
             <!-- Database error in vBulletin 4.2.1:  Invalid SQL:  		SELECT username, userid, birthday, showbirthday 		FROM user 		WHERE (birthday LIKE '10-21-%' OR birthday LIKE '10-22-%') 		AND usergroupid IN (0, 22, 25, 5, 27, 30, 28, 23, 7, 2, 6, 21) 		AND showbirthday IN (2, 3) 		AND lastactivity &gt;= 1408715612;  MySQL Error   : Table './xxx_forum/user' is marked as crashed and should be repaired Error Number  : 145 Request Date  : Tuesday, October 21st 2014 @ 01:53:32 PM Error Date    : Tuesday, October 21st 2014 @ 01:53:32 PM Script        : http://www.com/forum/forum.php Referrer      :  IP Address    : XX.XXX.XX.XXX Username      : Unregistered Classname     : vB_Database MySQL Version :   Stack Trace:  #0 vB_Database-&gt;halt() called in [path]/includes/class_core.php on line 426 #1 vB_Database-&gt;execute_query() called in [path]/includes/class_core.php on line 473 #2 vB_Database-&gt;query_read_slave() called in [path]/includes/functions_databuild.php on line 1726 #3 build_birthdays() called in [path]/forum.php on line 149   -->

            Comment

            • Sqυιd
              Member
              • Mar 2009
              • 39
              • 4.2.X

              #7
              If you read the error message you'll note that your user table has been marked by mysql as crashed. Here's a link to mysql's page for repairing a crashed myisam table.

              Comment

              • Lynne
                Former vBulletin Support
                • Oct 2004
                • 26255

                #8
                If you have access to your database via phpMySQL, then select the table (the "user" table) and run Repair database on the table. If it runs and says it is OK, then you should be fine. If it's doesn't say "OK" after running it once, then try running it again.

                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 &lt;- awesome site for html/css help

                Comment

                • -martin-
                  Member
                  • Feb 2010
                  • 47
                  • 4.2.x

                  #9
                  acctually I don't see user table in the database! It looks like somehow got erased! In the last backup I can clearly see that existed.

                  Comment

                  • Lynne
                    Former vBulletin Support
                    • Oct 2004
                    • 26255

                    #10
                    If you are missing your user table, then you have major problems. I would suggest uploading your database backup and using that for your site.

                    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 &lt;- awesome site for html/css help

                    Comment

                    • -martin-
                      Member
                      • Feb 2010
                      • 47
                      • 4.2.x

                      #11
                      I see now. When i did sql restore to localhost it was without user table, but on my main host there is still user table, after doing check with phpmyadmin those are the results:
                      XX_forum.user check warning Table is marked as crashed
                      XX_forum.user check warning 1 client is using or hasn't closed the table prope...
                      XX_forum.user check error Checksum for key: 10 doesn't match checksum for re...
                      XX_forum.user check error Corrupt

                      Comment

                      • -martin-
                        Member
                        • Feb 2010
                        • 47
                        • 4.2.x

                        #12
                        Code:
                        repair table user;
                        sql query solved the thing. Thanks for help.

                        Comment

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