Announcement

Collapse
No announcement yet.

Database error

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

  • [Forum] Database error

    Hello everyone!
    Today i check an old thread on my forum, when i tried to open thread, database error shown. If i open second page of thread then it open successfully.
    It should be possible that any other thread contain this error but i do not notice it.
    What is solution of this error?

    thread link
    https://www.pakistanipoint.com/showt...est-April-2008
    page 2 link
    https://www.pakistanipoint.com/showt...7b26b1e4be1221


    error report
    Code:
    Database error in vBulletin 4.2.5:
    
    Invalid SQL:
    
            SELECT
                post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
                user.*, userfield.*, usertextfield.*,
                icon.title as icontitle, icon.iconpath,
                avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight,
                spamlog.postid AS spamlog_postid,
                deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason,
    
                editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline,
                editlog.reason AS edit_reason, editlog.hashistory,
                postparsed.pagetext_html, postparsed.hasimages,
                sigparsed.signatureparsed, sigparsed.hasimages AS sighasimages,
                sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight,
                IF(user.displaygroupid=0, user.usergroupid, user.displaygroupid) AS displaygroupid, infractiongroupid
    
                , dbtech_thanks_statistics.*, post.userid
            FROM post AS post
            LEFT JOIN user AS user ON(user.userid = post.userid)
            LEFT JOIN userfield AS userfield ON(userfield.userid = user.userid)
            LEFT JOIN usertextfield AS usertextfield ON(usertextfield.userid = user.userid)
            LEFT JOIN icon AS icon ON(icon.iconid = post.iconid)
            LEFT JOIN avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN customavatar AS customavatar ON(customavatar.userid = user.userid)
            LEFT JOIN spamlog AS spamlog ON(spamlog.postid = post.postid)
                LEFT JOIN deletionlog AS deletionlog ON(post.postid = deletionlog.primaryid AND deletionlog.type = 'post')
            LEFT JOIN editlog AS editlog ON(editlog.postid = post.postid)
            LEFT JOIN postparsed AS postparsed ON(postparsed.postid = post.postid AND postparsed.styleid = 69 AND postparsed.languageid = 1)
            LEFT JOIN sigparsed AS sigparsed ON(sigparsed.userid = user.userid AND sigparsed.styleid = 69 AND sigparsed.languageid = 1)
            LEFT JOIN sigpic AS sigpic ON(sigpic.userid = post.userid)
    
                 LEFT JOIN dbtech_thanks_statistics AS dbtech_thanks_statistics ON(dbtech_thanks_statistics.userid = post.userid) 
            WHERE post.postid IN (01657086,1657086,1657088,1657089,1657391,1657496,1657528,1657584,1657612,1657917,1657950,1662649,2133477)
            ORDER BY post.dateline;
    
    MySQL Error   : Table 'postparsed' is marked as crashed and should be repaired
    Error Number  : 1194
    Request Date  : Saturday, October 28th 2017 @ 04:48:38 PM
    Error Date    : Saturday, October 28th 2017 @ 04:48:38 PM
    Script        : http://www.pakistanipoint.com/showthread.php?135862-Jasoosi-Digest-April-2008
    Referrer      : https://www.pakistanipoint.com/showthread.php?163573-%D9%84%D8%A7%D8%A6%D8%A8%D8%B1%DB%8C%D8%B1%DB%8C-%DA%A9%DB%8C-%D8%B3%DB%8C%D9%B9%D9%86%DA%AF/page7
    IP Address    : ****************
    Username      : ****************
    Classname     : vB_Database_MySQLi
    MySQL Version : 5.6.37
    Server        : **************
    User Agent    :

  • #2

    postparsed table is crashed. Go to Admin CP -> Maintenance -> Repair / Optimize Tables, check the box for the postparsed table, scroll to the bottom select Repair (and only Repair, not optimize) and submit the form. You may need to run the command more than once. Eventually the table should come back as saying it's OK. This should fix the immediate issue. If another table crashes it may be because of low disk space on your server, contact your host or whoever maintains your database and explain tables are crashing too often.

    Comment


    • #3
      Thank you so much Joe D

      Comment


      • #4
        Hello
        Now I face Database error on opening every thread
        report
        <code>
        Database error in vBulletin 4.2.5:

        Invalid SQL:
        REPLACE INTO contentread
        (ipid, userid, readtype, dateline, contentid, contenttypeid)
        VALUES
        (4975394, 18406, 'view', 1523718383, 126991, 2);

        MySQL Error : Duplicate entry '4876243' for key 'readid'
        Error Number : 1062
        Request Date : Saturday, April 14th 2018 @ 03:06:23 PM
        Error Date : Saturday, April 14th 2018 @ 03:06:23 PM
        Script : http://www.pakistanipoint.com/showth...%D8%A7%D8%B3-1
        Referrer : https://www.pakistanipoint.com/forum...hp?200-Courses
        IP Address : ***********
        Username : ****************
        Classname : vB_Database_MySQLi
        MySQL Version : 5.6.38
        Server : ***************
        User Agent :
        </code>

        Comment


        • #5
          I also found that visitors do not face database error

          Comment


          • #6
            Originally posted by Haseeb Razzaq View Post
            Hello
            Now I face Database error on opening every thread
            report
            <code>
            Database error in vBulletin 4.2.5:

            Invalid SQL:
            REPLACE INTO contentread
            (ipid, userid, readtype, dateline, contentid, contenttypeid)
            VALUES
            (4975394, 18406, 'view', 1523718383, 126991, 2);

            MySQL Error : Duplicate entry '4876243' for key 'readid'
            Error Number : 1062
            Request Date : Saturday, April 14th 2018 @ 03:06:23 PM
            Error Date : Saturday, April 14th 2018 @ 03:06:23 PM
            Script : http://www.pakistanipoint.com/showth...%D8%A7%D8%B3-1
            Referrer : https://www.pakistanipoint.com/forum...hp?200-Courses
            IP Address : ***********
            Username : ****************
            Classname : vB_Database_MySQLi
            MySQL Version : 5.6.38
            Server : ***************
            User Agent :
            </code>
            I would make a backup of the database first

            Then run this command on the database:

            Code:
            DELETE FROM contentread WHERE readid = 4876243;
            And see what happens, If you still have an issue go to Admin CP -> Maintenance -> Repair & Optimize Tables.and scroll to the bottom to the section "Fix Unique Indexes." Follow the instructions to create the /install/ directory and upload the file mysql-schema.php from the original install zip before running the command. Delete the /install/ directory when it is complete.

            Comment


            • #7
              Hello
              Now i face error on whole forum

              Code:
              Database error in vBulletin 4.2.5:
              
              Invalid SQL:
              
                              INSERT IGNORE INTO session
                                  (sessionhash, userid, host, idhash, lastactivity, location, styleid, languageid, loggedin, inforum, inthread, incalendar, badlocation, useragent, bypass, profileupdate, apiclientid, apiaccesstoken)
                              VALUES
                                  ('08f7f1008f89ed540828f25bf8cc4d98', 18406, '39.49.96.38', '249192bd573d23d7c0b5902d1175e4f1', 1569760729, '/login.php?do=login&amp;do=login', 0, 0, 1, 0, 0, 0, 0, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', 1, 0, 0, '');
              
              MySQL Error   : The table 'session' is full
              Error Number  : 1114
              Request Date  : Sunday, September 29th 2019 @ 01:38:49 PM
              Error Date    : Sunday, September 29th 2019 @ 01:39:04 PM
              Script        : http://www.pakistanipoint.com/login.php?do=login
              Referrer      : https://www.pakistanipoint.com/forum.php
              IP Address    : **********
              Username      : *******
              Classname     : vB_Database_MySQLi
              MySQL Version : 5.6.45
              Server        : 191.101.241.9
              User Agent    :

              Comment


              • #8
                Sometime I found internal server error also

                Comment


                • #9
                  Your session table is full, as the error suggests.

                  Run this query:

                  TRUNCATE TABLE session
                  MARK.B | vBULLETIN SUPPORT

                  TalkNewsUK - My vBulletin 5.5.4 Demo
                  AdminAmmo - My Cloud Demo

                  Comment


                  • #10
                    I have not access to forum and admin cp.
                    what is the alternative way to run query

                    Comment


                    • #11
                      You would have to run the query through phpMyAdmin or whatever tool your hosting provider gives to run queries.
                      Translations provided by Google.

                      Wayne Luke
                      The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                      vBulletin 5 Documentation - Updated every Friday. Report issues here.
                      vBulletin 5 API - Full / Mobile
                      I am not currently available for vB Messenger Chats.

                      Comment


                      • #12
                        Originally posted by Wayne Luke View Post
                        You would have to run the query through phpMyAdmin or whatever tool your hosting provider gives to run queries.
                        I tried using PHPmyadmin. Then following error occur

                        Code:
                        Error
                        SQL query:
                        
                        
                        TRUNCATE TABLE SESSION
                        MySQL said: Documentation
                        
                        #1146 - Table 'shahzeb_vbbulltein.SESSION' doesn't exist

                        Comment


                        • #13
                          Table names are case sensitive on Linux and Unix systems. We would create it with lowercase letters. Or you might be using a table prefix. You'll need to look the at list of tables in phpMyAdmin, and empty all tables with session in their names.
                          Translations provided by Google.

                          Wayne Luke
                          The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                          vBulletin 5 Documentation - Updated every Friday. Report issues here.
                          vBulletin 5 API - Full / Mobile
                          I am not currently available for vB Messenger Chats.

                          Comment

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