Invalid SQL (from search.php)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • quitsmoking
    Member
    • Mar 2006
    • 37
    • 3.6.x

    Invalid SQL (from search.php)

    I receive like 10 notifications everyday from my forums saying:
    Code:
    Invalid SQL:
    SELECT threadid FROM vb_thread AS thread
    WHERE threadid IN(here goes a list of the 500,000 threads IDs!)
    [COLOR=#000000][FONT=Times New Roman][FONT=arial]ORDER BY lastpost DESC;
    [/FONT][/FONT][/COLOR][COLOR=#000000][FONT=Times New Roman][FONT=arial]Script       : [COLOR=#0000cc]http://********.com/search.php?do=process[/COLOR][/FONT][/FONT][/COLOR]
    My question is: what type of search generates this query? I need to disable it. How?
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    That looks like the basic query to list threads after a search - but 500,000 thread ids? How many threads do you allow your users to display on a search page - vboptions > message searching options > search results posts per page & max search results to return ?

    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

    • quitsmoking
      Member
      • Mar 2006
      • 37
      • 3.6.x

      #3
      25
      500
      But I think they don't matter.
      What matters is: why does it need to use "in (1, 2, 3, 4, ...., 500000)" in the query? How can I disable that?

      Comment

      • Lynne
        Former vBulletin Support
        • Oct 2004
        • 26255

        #4
        That should not be happening in default vbulletin.

        Try disabling your modifications/plugins and see if you still have this problem.
        Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

        PHP Code:
        define('DISABLE_HOOKS'true); 

        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

        • quitsmoking
          Member
          • Mar 2006
          • 37
          • 3.6.x

          #5
          Thank you. I would have done this if I can replicate that error by myself but I can't. It happens like 10 times a day at different times (meaning that a special search generates it not the normal search because we have like a million pageviews a day so normal searches must be in hundreds).
          I have no plugins/addons that deal with searching or alters any queries indeed.
          Can you suggest a PHP file to check or something to do?

          Comment

          • Lynne
            Former vBulletin Support
            • Oct 2004
            • 26255

            #6
            Is it always the same user doing this? Perhaps you can ask them what they are doing?

            I tried a search in my 3.8.0 files for "WHERE threadid IN(" and could not find any select statement like what you have posted. That is why I suggested your plugins.

            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

            • quitsmoking
              Member
              • Mar 2006
              • 37
              • 3.6.x

              #7
              OK I will give it a try. Thank you.

              Comment

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