Announcement

Collapse
No announcement yet.

MySQL Errors - IP address appended to queries?!

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

  • MySQL Errors - IP address appended to queries?!

    Hi,
    For the last hour my vBulletin has been emailing me MySQL errors (over 2000 and counting). It seems to be occuring on various scripts throughout my site. The cause seems to be an IP address at the end of the "postuserid NOT IN ()" portion of the query.

    Examples - IP address highlighted:

    Database error in vBulletin 3.0.7:

    Invalid SQL:
    SELECT COUNT(*) AS threads,
    SUM(IF(lastpost>=1126537929 AND open<>10,1,0)) AS newthread
    FROM thread AS thread
    LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
    WHERE forumid = 6
    AND sticky = 0
    AND visible = 1
    AND postuserid NOT IN (17436,16774,3817,44448,6797,8974,211.30.34.196)
    AND lastpost >= 1123953636

    AND deletionlog.primaryid IS NULL

    mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '.34.196)
    AND lastpost >= 1123953636

    AND deletionlog.

    mysql error number: 1064

    Date: Monday 12th of September 2005 06:20:36 PM
    Script: http://www.redcafe.net/forumdisplay.php?f=6
    Referer: http://www.redcafe.net/forum.php?
    Username: mickthered
    IP Address: 84.66.8.221
    Database error in vBulletin 3.0.7:

    Invalid SQL:
    SELECT post.postid, IF(post.userid = 0, post.username, user.username) AS username,
    post.pagetext, post.allowsmilie, post.userid, post.dateline
    FROM post AS post
    LEFT JOIN user AS user ON(user.userid = post.userid)
    LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND deletionlog.type = 'post')
    WHERE post.visible = 1
    AND post.userid NOT IN (17436,16774,3817,44448,6797,8974,211.30.34.196)
    AND post.threadid = 87817
    AND deletionlog.primaryid IS NULL
    ORDER BY dateline DESC, postid DESC
    LIMIT 41
    mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '.34.196)
    AND post.threadid = 87817
    AND deletionlog.prima

    mysql error number: 1064

    Date: Monday 12th of September 2005 06:20:58 PM
    Script: http://www.redcafe.net/newreply.php?...te=1&p=1590828
    Referer: http://www.redcafe.net/showthread.ph...18#post1590818
    Username: Richter
    IP Address: 213.114.194.87
    Anybody know what is going on and a solution?

    Using vBulletin 3.0.7.

    Thanks in advance.

  • #2
    Any file hacks? Regardless, you should try uploading the original PHP files for your version. A modified or corrupt file is the only cause I can think of for this problem.

    Comment


    • #3
      I just checked and none of the files have been modified in weeks. It looks like an issue within the database itself?

      Comment


      • #4
        Queries are generated by the files. A database problem would return a different MySQL error to indicate corruption or something. This is a problem with the query itself.

        You say the files haven't been modified in weeks, but it is still necessary to upload the original files to eliminate that possibility. If you have file hacks then you can backup first.

        Comment


        • #5
          Problem solved - a mod had put that IP address in the Tachy Goes to Coventry field instead of the Banned IP addresses textarea

          This might be worth noting as a minor bug - error checking on the Coventry field could be improved to filter out non-numeric characters.

          Comment

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