• Welcome to Simple Machines Community Forum. Please login or sign up.
December 04, 2021, 08:47:53 AM

News:

Join the Facebook Fan Page.


Search Error

Started by plusev, July 21, 2009, 07:40:06 PM

Previous topic - Next topic

plusev

Not sure. How would I find that out?

Arantor

Do you have access to phpMyAdmin?

If so, look up that table in the database (it'll be in the left menu), and you'll see the Structure tab. Please can we have a screenshot from there?
No good deed goes unpunished
All helpful urges should be circumvented

Norv

About debug information: on the bottom of the search page, there should be something like:

Templates: 2: index (default), Search (default).
Sub templates: 6: init, html_above, body_above, results, body_below, html_below.
Language files: 2: index+Modifications.english (default), Search.english (default).
Style sheets: 1: index(default).
Files included: 16 - 621KB. (show)
Cache hits: 5: 0.00058s for 7261 bytes (show)
Queries used: 14.

Please eventually check out those queries. The last few ones, could be good to know and perhaps to run directly in phpMyAdmin, to see what can be wrong with them, if anything.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

plusev

Quote from: Arantor on September 27, 2009, 11:55:44 AM
Do you have access to phpMyAdmin?

If so, look up that table in the database (it'll be in the left menu), and you'll see the Structure tab. Please can we have a screenshot from there?

plusev

Quote from: Norv on September 27, 2009, 12:25:04 PM
About debug information: on the bottom of the search page, there should be something like:

Templates: 2: index (default), Search (default).
Sub templates: 6: init, html_above, body_above, results, body_below, html_below.
Language files: 2: index+Modifications.english (default), Search.english (default).
Style sheets: 1: index(default).
Files included: 16 - 621KB. (show)
Cache hits: 5: 0.00058s for 7261 bytes (show)
Queries used: 14.

Please eventually check out those queries. The last few ones, could be good to know and perhaps to run directly in phpMyAdmin, to see what can be wrong with them, if anything.

Heres th short version

Templates: 4: index (The_PlayGround_Ultimate), Portal (default), Search (default), Search (default).
Sub templates: 8: init, html_above, body_above, portal_above, main, portal_below, body_below, html_below.
Language files: 5: SPortal.english (The_PlayGround_Ultimate), index+Modifications.english (The_PlayGround_Ultimate), ThemeStrings.english (The_PlayGround_Ultimate), Search.english (The_PlayGround_Ultimate), Errors.english (The_PlayGround_Ultimate).
Style sheets: 2: index(The_PlayGround_Ultimate), portal(The_PlayGround_Ultimate).
Files included: 27 - 1071KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/Subs-Portal.php, ./Sources/LoadAds.php, ./Sources/Subs-Db-mysql.php, ./Sources/ManageMaintenance.php, ./Themes/default/languages/SPortal.english.php, ./Themes/The_PlayGround_Ultimate/index.template.php, ./Themes/default/languages/index.english.php, ./Themes/default/languages/Modifications.english.php, ./Themes/The_PlayGround_Ultimate/languages/ThemeStrings.english.php, ./Sources/PortalBlocks.php, ./SSI.php, ./Themes/default/Portal.template.php, ./Sources/Search.php, ./Themes/default/languages/Search.english.php, ./Themes/default/Search.template.php, ./Sources/Display.php, ./Sources/DbSearch-mysql.php, ./Sources/SearchAPI-Standard.php, ./Themes/default/languages/Errors.english.php, ./Sources/Subs-Aeva.php)
Queries used: 12.


and the long

Templates: 4: index (The_PlayGround_Ultimate), Portal (default), Search (default), Search (default).
Sub templates: 8: init, html_above, body_above, portal_above, main, portal_below, body_below, html_below.
Language files: 5: SPortal.english (The_PlayGround_Ultimate), index+Modifications.english (The_PlayGround_Ultimate), ThemeStrings.english (The_PlayGround_Ultimate), Search.english (The_PlayGround_Ultimate), Errors.english (The_PlayGround_Ultimate).
Style sheets: 2: index(The_PlayGround_Ultimate), portal(The_PlayGround_Ultimate).
Files included: 27 - 1071KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/Subs-Portal.php, ./Sources/LoadAds.php, ./Sources/Subs-Db-mysql.php, ./Sources/ManageMaintenance.php, ./Themes/default/languages/SPortal.english.php, ./Themes/The_PlayGround_Ultimate/index.template.php, ./Themes/default/languages/index.english.php, ./Themes/default/languages/Modifications.english.php, ./Themes/The_PlayGround_Ultimate/languages/ThemeStrings.english.php, ./Sources/PortalBlocks.php, ./SSI.php, ./Themes/default/Portal.template.php, ./Sources/Search.php, ./Themes/default/languages/Search.english.php, ./Themes/default/Search.template.php, ./Sources/Display.php, ./Sources/DbSearch-mysql.php, ./Sources/SearchAPI-Standard.php, ./Themes/default/languages/Errors.english.php, ./Sources/Subs-Aeva.php)
Queries used: 12.

         SELECT variable, value
         FROM smf_settings
   in //Sources/Load.php line 158, which took 0.00169396 seconds.

      SELECT data
      FROM smf_sessions
      WHERE session_id = 'b76dcc03836bb015655ca8f06d3c1ede'
      LIMIT 1
   in //Sources/Load.php line 2252, which took 0.00069594 seconds.

            SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
            FROM smf_members AS mem
               LEFT JOIN smf_attachments AS a ON (a.id_member = 1)
            WHERE mem.id_member = 1
            LIMIT 1
   in //Sources/Load.php line 354, which took 0.00047302 seconds.

      SELECT *
      FROM smf_ads
      order by ADS_ID
   in //Sources/LoadAds.php line 29, which took 0.00042987 seconds.

         SELECT variable, value, id_member, id_theme
         FROM smf_themes
         WHERE id_member IN (-1, 0, 1)
            AND id_theme IN (4, 1)
   in //Sources/Load.php line 1333, which took 0.00036812 seconds.

      SELECT
         spb.id_block, spb.label, spb.type, spb.col, spb.row, spb.state,
         spb.force_view, spb.allowed_groups, spb.permission_type, spb.display,
         spb.display_custom, spb.style, spp.variable, spp.value
      FROM smf_sp_blocks AS spb
         LEFT JOIN smf_sp_parameters AS spp ON (spp.id_block = spb.id_block)
      WHERE spb.state = 1
      ORDER BY spb.col, spb.row
   in //Sources/Subs-Portal.php line 309, which took 0.00055289 seconds.

         SELECT b.id_board
         FROM smf_boards AS b
         WHERE 1=1
   in //Sources/Search.php line 553, which took 0.00034189 seconds.

         SELECT COUNT(*)
         FROM smf_boards
   in //Sources/Search.php line 575, which took 0.00028992 seconds.

      SELECT b.id_cat, c.name AS cat_name, b.id_board, b.name, b.child_level
      FROM smf_boards AS b
         LEFT JOIN smf_categories AS c ON (c.id_cat = b.id_cat)
      WHERE 1=1
   in //Sources/Search.php line 154, which took 0.00043392 seconds.

      UPDATE smf_log_activity
      SET
         hits = hits + 1
      WHERE date = '2009-09-27'
   in //Sources/Subs.php line 3009, which took 0.00033903 seconds.

               SELECT code, filename, description
               FROM smf_smileys
   in //Sources/Subs.php line 2524, which took 0.00034118 seconds.

         SELECT url_id, replacement
         FROM smf_pretty_urls_cache
         WHERE url_id IN ('`B/Themes/The_PlayGround_Ultimate/theme_styles/style_framemaker.css?rc1', '`B/Themes/default/css/print.css?rc1', '`B/Themes/default/css/ie7.css', '`B/index.php?action=help', '`B/index.php?action=search', '`B/index.php', '`B/index.php?type=rss;action=.xml', '`B/Themes/The_PlayGround_Ultimate/css/index.css', '`B/Themes/The_PlayGround_Ultimate/css/portal.css', '`B/index.php?action=profile;u=7', '`B/index.php?variant=darkblue', '`B/index.php?variant=framemaker', '`B/index.php?variant=indesign', '`B/index.php?variant=smokeyblue', '`B/index.php?variant=darkpurple', '`B/index.php?variant=soundbooth', '`B/index.php?variant=silver', '`B/index.php?variant=lightroom', '`B/index.php?variant=aftereffects', '`B/index.php?variant=sienna', '`B/index.php?variant=author', '`B/index.php?variant=fireworks', '`B/index.php?variant=pastelblue', '`B/index.php?variant=pastelcopper', '`B/index.php?variant=pastelgreen', '`B/index.php?variant=pastelpink', '`B/index.php?variant=pastellilac', '`B/index.php?variant=pastelgold', '`B/index.php?variant=pastelturquoise', '`B/index.php?variant=darkgray><img src', '`B/index.php?variant=sports', '`B/index.php?variant=scifi', '`B/index.php?variant=game', '`B/index.php?variant=horror', '`B/index.php?variant=kids', '`B/index.php?variant=soap', '`B/index.php?variant=music', '`B/index.php?variant=drama', '`B/index.php?action=forum', '`B/index.php?action=rules', '`B/index.php?action=mgallery', '`B/index.php?action=downloads', '`B/index.php?action=profile', '`B/index.php?action=bookmarks', '`B/index.php?action=pm', '`B/index.php?action=mlist', '`B/index.php?action=calendar', '`B/index.php?action=contact', '`B/index.php?action=moderate', '`B/index.php?action=admin', '`B/index.php?action=logout', '`B/index.php?action=unread', '`B/index.php?action=unreadreplies', '`B/index.php?action=profile;area=showposts', '`B/index.php?action=search2', '`B/index.php?action=search;advanced', '`B/index.php?action=search;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MSwzLDQsNiw3LDgsOSwxMCwxMSwxMiwxMywxNCwxNSwxNiwxNywxOCwxOSwyMCwyMSwyMiwyMywyNCwyNSwyNiwyNywyOCwyOXwifHNob3dfY29tcGxldGV8J3x8InxzdWJqZWN0X29ubHl8J3x8Inxzb3J0fCd8cmVsZXZhbmNlfCJ8c29ydF9kaXJ8J3xkZXNjfCJ8c2VhcmNofCd8', '`B/index.php?action=search2;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MSwzLDQsNiw3LDgsOSwxMCwxMSwxMiwxMywxNCwxNSwxNiwxNywxOCwxOSwyMCwyMSwyMiwyMywyNCwyNSwyNiwyNywyOCwyOXwifHNob3dfY29tcGxldGV8J3x8InxzdWJqZWN0X29ubHl8J3x8Inxzb3J0fCd8cmVsZXZhbmNlfCJ8c29ydF9kaXJ8J3xkZXNjfCJ8c2VhcmNofCd8', '`B/index.php?action=pages', '`B/index.php?action=admin;area=featuresettings', '`B/index.php?action=admin;area=packages', '`B/index.php?action=admin;area=logs;sa=errorlog;desc', '`B/index.php?action=admin;area=permissions', '`B/index.php?action=admin;area=tags;sa=admin', '`B/index.php?action=moderate;area=modlog', '`B/index.php?action=moderate;area=postmod;sa=posts', '`B/index.php?action=moderate;area=attachmod;sa=attachments', '`B/index.php?action=moderate;area=reports', '`B/index.php?action=profile;area=account', '`B/index.php?action=profile;area=forumprofile', '`B/index.php?action=pm;sa=send', '`B/index.php?action=tags', '`B/index.php?action=calendar;sa=post', '`B/index.php?action=mlist;sa=search', 'http://banners.chipleader.com/banners/redirect.php?id=99&cmpgn_id=87344&prdct_id=1&cat_cd=UB', 'http://www.simplemachines.org/', 'http://www.simplemachines.org/about/copyright.php', 'http://www.simpleportal.net/', 'http://validator.w3.org/check/referer', '`B/index.php?wap2', 'http://graphicsmayhem.com', '`B/index.php?action=sitemap', '`B/index.php?page=Disclaimer', '`B/rules/?sa=additional')
   in //Sources/PrettyUrls-Filters.php line 55, which took 0.0010829 seconds.

Norv

Please, when it says (at the end) "Queries used: 12", that is a link, that displays the queries themselves. And the least query(queries) should be about search. Could you please paste those, or provide a link to your site with a normal account that can search?
(in PM eventually, please consider to not post the link as long as that debug information is active).
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Arantor

Norv, it's all there in the second code block.

I don't see the relevant query mentioned though.
No good deed goes unpunished
All helpful urges should be circumvented

Norv

Ah, yes. Strange. Could you please use a term you didn't search for before, like 'test1234', search for it, and please tell the queries?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

plusev

Templates: 3: index (The_PlayGround_Ultimate), Portal (default), Search (default).
Sub templates: 8: init, html_above, body_above, portal_above, results, portal_below, body_below, html_below.
Language files: 4: SPortal.english (The_PlayGround_Ultimate), index+Modifications.english (The_PlayGround_Ultimate), ThemeStrings.english (The_PlayGround_Ultimate), Search.english (The_PlayGround_Ultimate).
Style sheets: 2: index(The_PlayGround_Ultimate), portal(The_PlayGround_Ultimate).
Files included: 26 - 1040KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/Subs-Portal.php, ./Sources/LoadAds.php, ./Sources/Subs-Db-mysql.php, ./Sources/ManageMaintenance.php, ./Themes/default/languages/SPortal.english.php, ./Themes/The_PlayGround_Ultimate/index.template.php, ./Themes/default/languages/index.english.php, ./Themes/default/languages/Modifications.english.php, ./Themes/The_PlayGround_Ultimate/languages/ThemeStrings.english.php, ./Sources/PortalBlocks.php, ./SSI.php, ./Themes/default/Portal.template.php, ./Sources/Search.php, ./Themes/default/languages/Search.english.php, ./Themes/default/Search.template.php, ./Sources/Display.php, ./Sources/DbSearch-mysql.php, ./Sources/SearchAPI-Standard.php, ./Sources/Subs-Aeva.php)
Queries used: 27.

         SELECT variable, value
         FROM smf_settings
   in //Sources/Load.php line 158, which took 0.001616 seconds.

      SELECT data
      FROM smf_sessions
      WHERE session_id = 'b76dcc03836bb015655ca8f06d3c1ede'
      LIMIT 1
   in //Sources/Load.php line 2252, which took 0.00075102 seconds.

            SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
            FROM smf_members AS mem
               LEFT JOIN smf_attachments AS a ON (a.id_member = 1)
            WHERE mem.id_member = 1
            LIMIT 1
   in //Sources/Load.php line 354, which took 0.0009439 seconds.

      SELECT *
      FROM smf_ads
      order by ADS_ID
   in //Sources/LoadAds.php line 29, which took 0.00035596 seconds.

         SELECT variable, value, id_member, id_theme
         FROM smf_themes
         WHERE id_member IN (-1, 0, 1)
            AND id_theme IN (4, 1)
   in //Sources/Load.php line 1333, which took 0.00045705 seconds.

            DELETE FROM smf_log_online
            WHERE log_time < 1254086054
               AND session != 'b76dcc03836bb015655ca8f06d3c1ede'
   in //Sources/Subs.php line 2652, which took 0.0004251 seconds.

         UPDATE smf_log_online
         SET log_time = 1254086954, ip = IFNULL(INET_ATON('70.187.95.3'), 0), url = 'a:2:{s:6:\"action\";s:7:\"search2\";s:10:\"USER_AGENT\";s:166:\"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 3.0.04506.30; Zune 3.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)\";}'
         WHERE session = 'b76dcc03836bb015655ca8f06d3c1ede'
   in //Sources/Subs.php line 2668, which took 0.00039506 seconds.

      UPDATE smf_members
      SET last_login = 1254086954, member_ip = '70.187.95.3', member_ip2 = '70.187.95.3', total_time_logged_in = 235256
      WHERE id_member = 1
   in //Sources/Subs.php line 534, which took 0.00063682 seconds.

      SELECT
         spb.id_block, spb.label, spb.type, spb.col, spb.row, spb.state,
         spb.force_view, spb.allowed_groups, spb.permission_type, spb.display,
         spb.display_custom, spb.style, spp.variable, spp.value
      FROM smf_sp_blocks AS spb
         LEFT JOIN smf_sp_parameters AS spp ON (spp.id_block = spb.id_block)
      WHERE spb.state = 1
      ORDER BY spb.col, spb.row
   in /home/vg001web01/54/40/2004054/web/Sources/Subs-Portal.php line 309, which took 0.0073278 seconds.

         SELECT b.id_board
         FROM smf_boards AS b
         WHERE 1=1
   in //Sources/Search.php line 553, which took 0.00030994 seconds.

         SELECT COUNT(*)
         FROM smf_boards
   in //Sources/Search.php line 575, which took 0.00024104 seconds.

      DELETE FROM smf_log_floodcontrol
      WHERE log_time < 1254086952
         AND log_type = 'search'
   in //Sources/Subs.php line 3056, which took 0.00037193 seconds.

      REPLACE INTO smf_log_floodcontrol(`ip`, `log_time`, `log_type`)
      VALUES
         (SUBSTRING('70.187.95.3', 1, 16), 1254086954, 'search')
   in //Sources/Subs.php line 3064, which took 0.00030804 seconds.

      REPLACE INTO smf_settings(`variable`, `value`)
      VALUES
         (SUBSTRING('search_pointer', 1, 255), SUBSTRING('24', 1, 65534))
   in //Sources/Subs.php line 611, which took 0.000386 seconds.

            DELETE FROM smf_log_search_results
            WHERE id_search = 24
   in //Sources/Search.php line 1007, which took 0.00048804 seconds.

                  DROP TABLE IF EXISTS smf_tmp_log_search_topics
   in //Sources/Search.php line 1219, which took 0.00030899 seconds.

                  CREATE TEMPORARY TABLE smf_tmp_log_search_topics (
                     id_topic mediumint(8) unsigned NOT NULL default '0',
                     PRIMARY KEY (id_topic)
                  ) TYPE=HEAP
   in //Sources/Search.php line 1229, which took 0.000314 seconds.

                     DELETE FROM smf_log_search_topics
                     WHERE id_search = 24
   in //Sources/Search.php line 1239, which took 0.0003531 seconds.

                     INSERT IGNORE INTO smf_log_search_topics
                        (id_search, id_topic)
                     SELECT 24, t.id_topic
                     FROM smf_topics AS t
                        INNER JOIN smf_log_search_subjects AS subj1 ON (subj1.id_topic = t.id_topic)
                     WHERE subj1.word LIKE '%test12345%'
                     LIMIT 1200
   in //Sources/Search.php line 1340, which took 0.00059795 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254086954, SUBSTRING('70.187.95.3', 1, 16), SUBSTRING('?pretty;action=search2', 1, 65534), SUBSTRING('512: \r<br />               INSERT IGNORE INTO {db_prefix}log_search_results\r<br />                     (id_search, relevance, id_topic, id_msg, num_matches)', 1, 65534), '6dadb4e5613101be3d911160f5b6e7ae', 'general', SUBSTRING('//Sources/Search.php', 1, 255), 1565)
   in //Sources/Errors.php line 150, which took 0.00050807 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254086954, SUBSTRING('70.187.95.3', 1, 16), SUBSTRING('?pretty;action=search2', 1, 65534), SUBSTRING('1024: Parameters: 18 8 200 1 %test12345%', 1, 65534), '6dadb4e5613101be3d911160f5b6e7ae', 'general', SUBSTRING('//Sources/Search.php', 1, 255), 1567)
   in //Sources/Errors.php line 150, which took 0.00044417 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254086954, SUBSTRING('70.187.95.3', 1, 16), SUBSTRING('?pretty;action=search2', 1, 65534), SUBSTRING('1024: The database doesn\'t support ignore', 1, 65534), '6dadb4e5613101be3d911160f5b6e7ae', 'general', SUBSTRING('//Sources/Search.php', 1, 255), 1570)
   in //Sources/Errors.php line 150, which took 0.00042295 seconds.

                  INSERT IGNORE INTO smf_log_search_results
                     (id_search, relevance, id_topic, id_msg, num_matches)
                  SELECT
                     24,
                     1000 * (25 * COUNT(*) / (MAX(t.num_replies) + 1) + 25 * CASE WHEN MAX(m.id_msg) < 18 THEN 0 ELSE (MAX(m.id_msg) - 18) / 8 END + 20 * CASE WHEN MAX(t.num_replies) < 200 THEN MAX(t.num_replies) / 200 ELSE 1 END + 15 * 0 + 10 * CASE WHEN MIN(m.id_msg) = MAX(t.id_first_msg) THEN 1 ELSE 0 END + 5 * MAX(t.is_sticky)) / 100 AS relevance,
                     t.id_topic,
                     MAX(m.id_msg) AS id_msg,
                     COUNT(*) AS num_matches
                  FROM smf_topics AS t
                     INNER JOIN smf_messages AS m ON (m.id_topic = t.id_topic)
                  WHERE m.body LIKE '%test12345%'
                  GROUP BY t.id_topic
                  LIMIT 1200
   in //Sources/Search.php line 1588, which took 0.00072098 seconds.

         SELECT lsr.id_topic, lsr.id_msg, lsr.relevance, lsr.num_matches
         FROM smf_log_search_results AS lsr
         WHERE lsr.id_search = 24
         ORDER BY relevance desc
         LIMIT 0, 30
   in //Sources/Search.php line 1707, which took 0.00040817 seconds.

      UPDATE smf_log_activity
      SET
         hits = hits + 1
      WHERE date = '2009-09-27'
   in //Sources/Subs.php line 3009, which took 0.00040889 seconds.

               SELECT code, filename, description
               FROM smf_smileys
   in //Sources/Subs.php line 2524, which took 0.00034904 seconds.

         SELECT url_id, replacement
         FROM smf_pretty_urls_cache
         WHERE url_id IN ('`B/Themes/The_PlayGround_Ultimate/theme_styles/style_framemaker.css?rc1', '`B/Themes/default/css/print.css?rc1', '`B/Themes/default/css/ie7.css', '`B/index.php?action=help', '`B/index.php?action=search', '`B/index.php', '`B/index.php?type=rss;action=.xml', '`B/Themes/The_PlayGround_Ultimate/css/index.css', '`B/Themes/The_PlayGround_Ultimate/css/portal.css', '`B/index.php?action=profile;u=7', '`B/index.php?variant=darkblue', '`B/index.php?variant=framemaker', '`B/index.php?variant=indesign', '`B/index.php?variant=smokeyblue', '`B/index.php?variant=darkpurple', '`B/index.php?variant=soundbooth', '`B/index.php?variant=silver', '`B/index.php?variant=lightroom', '`B/index.php?variant=aftereffects', '`B/index.php?variant=sienna', '`B/index.php?variant=author', '`B/index.php?variant=fireworks', '`B/index.php?variant=pastelblue', '`B/index.php?variant=pastelcopper', '`B/index.php?variant=pastelgreen', '`B/index.php?variant=pastelpink', '`B/index.php?variant=pastellilac', '`B/index.php?variant=pastelgold', '`B/index.php?variant=pastelturquoise', '`B/index.php?variant=darkgray><img src', '`B/index.php?variant=sports', '`B/index.php?variant=scifi', '`B/index.php?variant=game', '`B/index.php?variant=horror', '`B/index.php?variant=kids', '`B/index.php?variant=soap', '`B/index.php?variant=music', '`B/index.php?variant=drama', '`B/index.php?action=forum', '`B/index.php?action=rules', '`B/index.php?action=mgallery', '`B/index.php?action=downloads', '`B/index.php?action=profile', '`B/index.php?action=bookmarks', '`B/index.php?action=pm', '`B/index.php?action=mlist', '`B/index.php?action=calendar', '`B/index.php?action=contact', '`B/index.php?action=moderate', '`B/index.php?action=admin', '`B/index.php?action=logout', '`B/index.php?action=unread', '`B/index.php?action=unreadreplies', '`B/index.php?action=profile;area=showposts', '`B/index.php?action=search2', '`B/index.php?action=search;advanced', '`B/index.php?action=search;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MSwzLDQsNiw3LDgsOSwxMCwxMSwxMiwxMywxNCwxNSwxNiwxNywxOCwxOSwyMCwyMSwyMiwyMywyNCwyNSwyNiwyNywyOCwyOXwifHNob3dfY29tcGxldGV8J3x8InxzdWJqZWN0X29ubHl8J3x8Inxzb3J0fCd8cmVsZXZhbmNlfCJ8c29ydF9kaXJ8J3xkZXNjfCJ8c2VhcmNofCd8dGVzdDEyMzQ1', '`B/index.php?action=search2;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MSwzLDQsNiw3LDgsOSwxMCwxMSwxMiwxMywxNCwxNSwxNiwxNywxOCwxOSwyMCwyMSwyMiwyMywyNCwyNSwyNiwyNywyOCwyOXwifHNob3dfY29tcGxldGV8J3x8InxzdWJqZWN0X29ubHl8J3x8Inxzb3J0fCd8cmVsZXZhbmNlfCJ8c29ydF9kaXJ8J3xkZXNjfCJ8c2VhcmNofCd8dGVzdDEyMzQ1', '`B/index.php?action=pages', '`B/index.php?action=admin;area=featuresettings', '`B/index.php?action=admin;area=packages', '`B/index.php?action=admin;area=logs;sa=errorlog;desc', '`B/index.php?action=admin;area=permissions', '`B/index.php?action=admin;area=tags;sa=admin', '`B/index.php?action=moderate;area=modlog', '`B/index.php?action=moderate;area=postmod;sa=posts', '`B/index.php?action=moderate;area=attachmod;sa=attachments', '`B/index.php?action=moderate;area=reports', '`B/index.php?action=profile;area=account', '`B/index.php?action=profile;area=forumprofile', '`B/index.php?action=pm;sa=send', '`B/index.php?action=tags', '`B/index.php?action=calendar;sa=post', '`B/index.php?action=mlist;sa=search', 'http://banners.chipleader.com/banners/redirect.php?id=99&cmpgn_id=87344&prdct_id=1&cat_cd=UB';, 'http://www.simplemachines.org/';, 'http://www.simplemachines.org/about/copyright.php';, 'http://www.simpleportal.net/';, 'http://validator.w3.org/check/referer';, '`B/index.php?wap2', 'http://graphicsmayhem.com', '`B/index.php?action=sitemap', '`B/index.php?page=Disclaimer', '`B/rules/?sa=additional')

Norv

September 28, 2009, 05:58:00 AM #49 Last Edit: September 28, 2009, 06:07:59 AM by Norv
Please, use the attached file instead.

On another note, could you please empty the Pretty URLs cache, and disable its usage for now? For all links.
Then try searching again: for a term that can be found, then for a term that cannot be found. Copying and pasting queries, as well as eventually the error log, would be useful.

UPDATE: quick note: as a guest, I don't have any problem searching, it works perfectly (tested words like "test", "test12345", "blah", "myself" - the last has a result as well). Can you please try too?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

plusev

I disabled Pretty URLs but could find where to clear the cache?

Here is a search for a known word that was never searched for in the past. I also gave the "An Error Has Occurred!
The database value you're trying to insert does not exist: id_search " error.


Templates: 4: index (The_PlayGround_Ultimate), Portal (default), Search (default), Errors (default).
Sub templates: 8: init, html_above, body_above, portal_above, fatal_error, portal_below, body_below, html_below.
Language files: 4: SPortal.english (The_PlayGround_Ultimate), index+Modifications.english (The_PlayGround_Ultimate), ThemeStrings.english (The_PlayGround_Ultimate), Search.english (The_PlayGround_Ultimate).
Style sheets: 2: index(The_PlayGround_Ultimate), portal(The_PlayGround_Ultimate).
Files included: 27 - 1050KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/Subs-Portal.php, ./Sources/LoadAds.php, ./Sources/Subs-Db-mysql.php, ./Sources/ManageMaintenance.php, ./Themes/default/languages/SPortal.english.php, ./Themes/The_PlayGround_Ultimate/index.template.php, ./Themes/default/languages/index.english.php, ./Themes/default/languages/Modifications.english.php, ./Themes/The_PlayGround_Ultimate/languages/ThemeStrings.english.php, ./Sources/PortalBlocks.php, ./SSI.php, ./Themes/default/Portal.template.php, ./Sources/Search.php, ./Themes/default/languages/Search.english.php, ./Themes/default/Search.template.php, ./Sources/Display.php, ./Sources/DbSearch-mysql.php, ./Sources/SearchAPI-Standard.php, ./Themes/default/Errors.template.php, ./Sources/Subs-Aeva.php)
Queries used: 25.

         SELECT variable, value
         FROM smf_settings
   in //Sources/Load.php line 158, which took 0.00185108 seconds.

      SELECT data
      FROM smf_sessions
      WHERE session_id = '093260e4d763e5e844c20293ae9563e4'
      LIMIT 1
   in //Sources/Load.php line 2252, which took 0.00063086 seconds.

            SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
            FROM smf_members AS mem
               LEFT JOIN smf_attachments AS a ON (a.id_member = 1)
            WHERE mem.id_member = 1
            LIMIT 1
   in //Sources/Load.php line 354, which took 0.00097895 seconds.

      SELECT *
      FROM smf_ads
      order by ADS_ID
   in //Sources/LoadAds.php line 29, which took 0.00038481 seconds.

         SELECT variable, value, id_member, id_theme
         FROM smf_themes
         WHERE id_member IN (-1, 0, 1)
            AND id_theme IN (4, 1)
   in //Sources/Load.php line 1333, which took 0.00044703 seconds.

            DELETE FROM smf_log_online
            WHERE log_time < 1254147184
               AND session != '093260e4d763e5e844c20293ae9563e4'
   in //Sources/Subs.php line 2652, which took 0.000453 seconds.

         UPDATE smf_log_online
         SET log_time = 1254148084, ip = IFNULL(INET_ATON('70.187.95.3'), 0), url = 'a:2:{s:6:\"action\";s:7:\"search2\";s:10:\"USER_AGENT\";s:166:\"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 3.0.04506.30; Zune 3.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)\";}'
         WHERE session = '093260e4d763e5e844c20293ae9563e4'
   in //Sources/Subs.php line 2668, which took 0.00039816 seconds.

      SELECT
         spb.id_block, spb.label, spb.type, spb.col, spb.row, spb.state,
         spb.force_view, spb.allowed_groups, spb.permission_type, spb.display,
         spb.display_custom, spb.style, spp.variable, spp.value
      FROM smf_sp_blocks AS spb
         LEFT JOIN smf_sp_parameters AS spp ON (spp.id_block = spb.id_block)
      WHERE spb.state = 1
      ORDER BY spb.col, spb.row
   in //Sources/Subs-Portal.php line 309, which took 0.00055695 seconds.

         SELECT b.id_board
         FROM smf_boards AS b
         WHERE 1=1
   in //Sources/Search.php line 553, which took 0.00032711 seconds.

         SELECT COUNT(*)
         FROM smf_boards
   in //Sources/Search.php line 575, which took 0.000283 seconds.

      DELETE FROM smf_log_floodcontrol
      WHERE log_time < 1254148082
         AND log_type = 'search'
   in //Sources/Subs.php line 3056, which took 0.00040507 seconds.

      REPLACE INTO smf_log_floodcontrol(`ip`, `log_time`, `log_type`)
      VALUES
         (SUBSTRING('70.187.95.3', 1, 16), 1254148084, 'search')
   in //Sources/Subs.php line 3064, which took 0.00032496 seconds.

      REPLACE INTO smf_settings(`variable`, `value`)
      VALUES
         (SUBSTRING('search_pointer', 1, 255), SUBSTRING('35', 1, 65534))
   in //Sources/Subs.php line 611, which took 0.00038791 seconds.

            DELETE FROM smf_log_search_results
            WHERE id_search = 35
   in //Sources/Search.php line 1007, which took 0.00032997 seconds.

                  DROP TABLE IF EXISTS smf_tmp_log_search_topics
   in //Sources/Search.php line 1219, which took 0.00027084 seconds.

                  CREATE TEMPORARY TABLE smf_tmp_log_search_topics (
                     id_topic mediumint(8) unsigned NOT NULL default '0',
                     PRIMARY KEY (id_topic)
                  ) TYPE=HEAP
   in //Sources/Search.php line 1229, which took 0.00030804 seconds.

                     DELETE FROM smf_log_search_topics
                     WHERE id_search = 35
   in //Sources/Search.php line 1239, which took 0.00034404 seconds.

                     INSERT IGNORE INTO smf_log_search_topics
                        (id_search, id_topic)
                     SELECT 35, t.id_topic
                     FROM smf_topics AS t
                        INNER JOIN smf_log_search_subjects AS subj1 ON (subj1.id_topic = t.id_topic)
                     WHERE subj1.word LIKE '%cascade%'
                     LIMIT 1200
   in //Sources/Search.php line 1340, which took 0.00068116 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254148084, SUBSTRING('70.187.95.3', 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('512: \r<br />               INSERT IGNORE INTO {db_prefix}log_search_results\r<br />                     (id_search, relevance, id_topic, id_msg, num_matches)', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'general', SUBSTRING('/home/vg001web01/54/40/2004054/web/Sources/Search.php', 1, 255), 1565)
   in //Sources/Errors.php line 150, which took 0.00055218 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254148084, SUBSTRING('70.187.95.3', 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('1024: Parameters: 18 8 200 1 %cascade%', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'general', SUBSTRING('/home/vg001web01/54/40/2004054/web/Sources/Search.php', 1, 255), 1567)
   in //Sources/Errors.php line 150, which took 0.00043917 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254148084, SUBSTRING(XXXXXXXXXXX, 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('1024: The database doesn\'t support ignore', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'general', SUBSTRING('//Sources/Search.php', 1, 255), 1570)
   in //Sources/Errors.php line 150, which took 0.00046182 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254148084, SUBSTRING(XXXXXXXXX, 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('The database value you\'re trying to insert does not exist: id_search<br />Function: PlushSearch2', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'critical', SUBSTRING('//Sources/Search.php', 1, 255), 1588)
   in /home/vg001web01/54/40/2004054/web/Sources/Errors.php line 150, which took 0.00041389 seconds.

      UPDATE smf_log_activity
      SET
         hits = hits + 1
      WHERE date = '2009-09-28'
   in //Sources/Subs.php line 3009, which took 0.00039506 seconds.

               SELECT code, filename, description
               FROM smf_smileys
   in //Sources/Subs.php line 2524, which took 0.00034904 seconds.


Here is one from a word known not to exist that has never been searched for. In this case search for words that are know not to exist does not give the "An Error Has Occurred! The database value you're trying to insert does not exist: id_search " error.

Templates: 3: index (The_PlayGround_Ultimate), Portal (default), Search (default).
Sub templates: 8: init, html_above, body_above, portal_above, results, portal_below, body_below, html_below.
Language files: 4: SPortal.english (The_PlayGround_Ultimate), index+Modifications.english (The_PlayGround_Ultimate), ThemeStrings.english (The_PlayGround_Ultimate), Search.english (The_PlayGround_Ultimate).
Style sheets: 2: index(The_PlayGround_Ultimate), portal(The_PlayGround_Ultimate).
Files included: 26 - 1040KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/Subs-Portal.php, ./Sources/LoadAds.php, ./Sources/Subs-Db-mysql.php, ./Sources/ManageMaintenance.php, ./Themes/default/languages/SPortal.english.php, ./Themes/The_PlayGround_Ultimate/index.template.php, ./Themes/default/languages/index.english.php, ./Themes/default/languages/Modifications.english.php, ./Themes/The_PlayGround_Ultimate/languages/ThemeStrings.english.php, ./Sources/PortalBlocks.php, ./SSI.php, ./Themes/default/Portal.template.php, ./Sources/Search.php, ./Themes/default/languages/Search.english.php, ./Themes/default/Search.template.php, ./Sources/Display.php, ./Sources/DbSearch-mysql.php, ./Sources/SearchAPI-Standard.php, ./Sources/Subs-Aeva.php)
Queries used: 25.

         SELECT variable, value
         FROM smf_settings
   in //Sources/Load.php line 158, which took 0.00162601 seconds.

      SELECT data
      FROM smf_sessions
      WHERE session_id = '093260e4d763e5e844c20293ae9563e4'
      LIMIT 1
   in //Sources/Load.php line 2252, which took 0.00044322 seconds.

            SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
            FROM smf_members AS mem
               LEFT JOIN smf_attachments AS a ON (a.id_member = 1)
            WHERE mem.id_member = 1
            LIMIT 1
   in //Sources/Load.php line 354, which took 0.00095701 seconds.

      SELECT *
      FROM smf_ads
      order by ADS_ID
   in //Sources/LoadAds.php line 29, which took 0.00036502 seconds.

         SELECT variable, value, id_member, id_theme
         FROM smf_themes
         WHERE id_member IN (-1, 0, 1)
            AND id_theme IN (4, 1)
   in //Sources/Load.php line 1333, which took 0.00046611 seconds.

            DELETE FROM smf_log_online
            WHERE log_time < 1254147585
               AND session != '093260e4d763e5e844c20293ae9563e4'
   in //Sources/Subs.php line 2652, which took 0.00043797 seconds.

         UPDATE smf_log_online
         SET log_time = 1254148485, ip = IFNULL(INET_ATON('70.187.95.3'), 0), url = 'a:2:{s:6:\"action\";s:7:\"search2\";s:10:\"USER_AGENT\";s:166:\"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 3.0.04506.30; Zune 3.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)\";}'
         WHERE session = '093260e4d763e5e844c20293ae9563e4'
   in //Sources/Subs.php line 2668, which took 0.00045514 seconds.

      SELECT
         spb.id_block, spb.label, spb.type, spb.col, spb.row, spb.state,
         spb.force_view, spb.allowed_groups, spb.permission_type, spb.display,
         spb.display_custom, spb.style, spp.variable, spp.value
      FROM smf_sp_blocks AS spb
         LEFT JOIN smf_sp_parameters AS spp ON (spp.id_block = spb.id_block)
      WHERE spb.state = 1
      ORDER BY spb.col, spb.row
   in //Sources/Subs-Portal.php line 309, which took 0.00062013 seconds.

         SELECT b.id_board
         FROM smf_boards AS b
         WHERE 1=1
   in //Sources/Search.php line 553, which took 0.000319 seconds.

         SELECT COUNT(*)
         FROM smf_boards
   in //Sources/Search.php line 575, which took 0.00025201 seconds.

      DELETE FROM smf_log_floodcontrol
      WHERE log_time < 1254148483
         AND log_type = 'search'
   in //Sources/Subs.php line 3056, which took 0.00042605 seconds.

      REPLACE INTO smf_log_floodcontrol(`ip`, `log_time`, `log_type`)
      VALUES
         (SUBSTRING(xxxxxxxxxxxxxx, 1, 16), 1254148485, 'search')
   in //Sources/Subs.php line 3064, which took 0.00037289 seconds.

      REPLACE INTO smf_settings(`variable`, `value`)
      VALUES
         (SUBSTRING('search_pointer', 1, 255), SUBSTRING('39', 1, 65534))
   in //Sources/Subs.php line 611, which took 0.0003891 seconds.

            DELETE FROM smf_log_search_results
            WHERE id_search = 39
   in //Sources/Search.php line 1007, which took 0.00033307 seconds.

                  DROP TABLE IF EXISTS smf_tmp_log_search_topics
   in //Sources/Search.php line 1219, which took 0.00025606 seconds.

                  CREATE TEMPORARY TABLE smf_tmp_log_search_topics (
                     id_topic mediumint(8) unsigned NOT NULL default '0',
                     PRIMARY KEY (id_topic)
                  ) TYPE=HEAP
   in //Sources/Search.php line 1229, which took 0.00032902 seconds.

                     DELETE FROM smf_log_search_topics
                     WHERE id_search = 39
   in //Sources/Search.php line 1239, which took 0.00036693 seconds.

                     INSERT IGNORE INTO smf_log_search_topics
                        (id_search, id_topic)
                     SELECT 39, t.id_topic
                     FROM smf_topics AS t
                        INNER JOIN smf_log_search_subjects AS subj1 ON (subj1.id_topic = t.id_topic)
                     WHERE subj1.word LIKE '%valley%'
                     LIMIT 1200
   in //Sources/Search.php line 1340, which took 0.00065088 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254148485, SUBSTRING('70.187.95.3', 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('512: \r<br />               INSERT IGNORE INTO {db_prefix}log_search_results\r<br />                     (id_search, relevance, id_topic, id_msg, num_matches)', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'general', SUBSTRING('//Sources/Search.php', 1, 255), 1565)
   in //Sources/Errors.php line 150, which took 0.00051308 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254148485, SUBSTRING('70.187.95.3', 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('1024: Parameters: 18 8 200 1 %valley%', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'general', SUBSTRING('//Sources/Search.php', 1, 255), 1567)
   in //Sources/Errors.php line 150, which took 0.00041485 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254148485, SUBSTRING(xxxxxxxxxx, 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('1024: The database doesn\'t support ignore', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'general', SUBSTRING('//Sources/Search.php', 1, 255), 1570)
   in //Sources/Errors.php line 150, which took 0.00050497 seconds.

                  INSERT IGNORE INTO smf_log_search_results
                     (id_search, relevance, id_topic, id_msg, num_matches)
                  SELECT
                     39,
                     1000 * (25 * COUNT(*) / (MAX(t.num_replies) + 1) + 25 * CASE WHEN MAX(m.id_msg) < 18 THEN 0 ELSE (MAX(m.id_msg) - 18) / 8 END + 20 * CASE WHEN MAX(t.num_replies) < 200 THEN MAX(t.num_replies) / 200 ELSE 1 END + 15 * 0 + 10 * CASE WHEN MIN(m.id_msg) = MAX(t.id_first_msg) THEN 1 ELSE 0 END + 5 * MAX(t.is_sticky)) / 100 AS relevance,
                     t.id_topic,
                     MAX(m.id_msg) AS id_msg,
                     COUNT(*) AS num_matches
                  FROM smf_topics AS t
                     INNER JOIN smf_messages AS m ON (m.id_topic = t.id_topic)
                  WHERE m.body LIKE '%valley%'
                  GROUP BY t.id_topic
                  LIMIT 1200
   in //Sources/Search.php line 1588, which took 0.000741 seconds.

         SELECT lsr.id_topic, lsr.id_msg, lsr.relevance, lsr.num_matches
         FROM smf_log_search_results AS lsr
         WHERE lsr.id_search = 39
         ORDER BY relevance desc
         LIMIT 0, 30
   in //Sources/Search.php line 1707, which took 0.00040293 seconds.

      UPDATE smf_log_activity
      SET
         hits = hits + 1
      WHERE date = '2009-09-28'
   in //Sources/Subs.php line 3009, which took 0.00041199 seconds.

               SELECT code, filename, description
               FROM smf_smileys
   in //Sources/Subs.php line 2524, which took 0.00036883 seconds.


I also tested with a regular user test account in FF. Same thing - known words gave the DB error and unknown words did not.

Thx

Norv

I searched for "myself", a word which has one result, it exists in a post, however, I did not have any error. (as guest).
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

plusev

Thats strange, as a guest the search seems to work.

Norv

Can you please try to use the previously attached file?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

plusev

Sorry about that - thought it was up but ftp was waiting for confirmation of overwrite. Anyway I ran the tests again.

Known word: It worked fine for a few searches until it finally had the "An Error Has Occurred! The database value you're trying to insert does not exist: id_search " error.


Templates: 4: index (The_PlayGround_Ultimate), Portal (default), Search (default), Errors (default).
Sub templates: 8: init, html_above, body_above, portal_above, fatal_error, portal_below, body_below, html_below.
Language files: 4: SPortal.english (The_PlayGround_Ultimate), index+Modifications.english (The_PlayGround_Ultimate), ThemeStrings.english (The_PlayGround_Ultimate), Search.english (The_PlayGround_Ultimate).
Style sheets: 2: index(The_PlayGround_Ultimate), portal(The_PlayGround_Ultimate).
Files included: 27 - 1051KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/Subs-Portal.php, ./Sources/LoadAds.php, ./Sources/Subs-Db-mysql.php, ./Sources/ManageMaintenance.php, ./Themes/default/languages/SPortal.english.php, ./Themes/The_PlayGround_Ultimate/index.template.php, ./Themes/default/languages/index.english.php, ./Themes/default/languages/Modifications.english.php, ./Themes/The_PlayGround_Ultimate/languages/ThemeStrings.english.php, ./Sources/PortalBlocks.php, ./SSI.php, ./Themes/default/Portal.template.php, ./Sources/Search.php, ./Themes/default/languages/Search.english.php, ./Themes/default/Search.template.php, ./Sources/Display.php, ./Sources/DbSearch-mysql.php, ./Sources/SearchAPI-Standard.php, ./Themes/default/Errors.template.php, ./Sources/Subs-Aeva.php)
Queries used: 22.

         SELECT variable, value
         FROM smf_settings
   in //Sources/Load.php line 158, which took 0.00232911 seconds.

      SELECT data
      FROM smf_sessions
      WHERE session_id = '093260e4d763e5e844c20293ae9563e4'
      LIMIT 1
   in //Sources/Load.php line 2252, which took 0.00064707 seconds.

            SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
            FROM smf_members AS mem
               LEFT JOIN smf_attachments AS a ON (a.id_member = 1)
            WHERE mem.id_member = 1
            LIMIT 1
   in //Sources/Load.php line 354, which took 0.00095391 seconds.

      SELECT *
      FROM smf_ads
      order by ADS_ID
   in //Sources/LoadAds.php line 29, which took 0.00040102 seconds.

         SELECT variable, value, id_member, id_theme
         FROM smf_themes
         WHERE id_member IN (-1, 0, 1)
            AND id_theme IN (4, 1)
   in //Sources/Load.php line 1333, which took 0.00038099 seconds.

      SELECT
         spb.id_block, spb.label, spb.type, spb.col, spb.row, spb.state,
         spb.force_view, spb.allowed_groups, spb.permission_type, spb.display,
         spb.display_custom, spb.style, spp.variable, spp.value
      FROM smf_sp_blocks AS spb
         LEFT JOIN smf_sp_parameters AS spp ON (spp.id_block = spb.id_block)
      WHERE spb.state = 1
      ORDER BY spb.col, spb.row
   in //Sources/Subs-Portal.php line 309, which took 0.00080991 seconds.

         SELECT b.id_board
         FROM smf_boards AS b
         WHERE 1=1
   in //Sources/Search.php line 553, which took 0.0024631 seconds.

         SELECT COUNT(*)
         FROM smf_boards
   in //Sources/Search.php line 575, which took 0.00028896 seconds.

      DELETE FROM smf_log_floodcontrol
      WHERE log_time < 1254153318
         AND log_type = 'search'
   in //Sources/Subs.php line 3056, which took 0.00063014 seconds.

      REPLACE INTO smf_log_floodcontrol(`ip`, `log_time`, `log_type`)
      VALUES
         (SUBSTRING(xxxxxxxxxxxxxxxxxxx, 1, 16), 1254153320, 'search')
   in //Sources/Subs.php line 3064, which took 0.00037813 seconds.

      REPLACE INTO smf_settings(`variable`, `value`)
      VALUES
         (SUBSTRING('search_pointer', 1, 255), SUBSTRING('51', 1, 65534))
   in //Sources/Subs.php line 611, which took 0.00043011 seconds.

            DELETE FROM smf_log_search_results
            WHERE id_search = 51
   in //Sources/Search.php line 1007, which took 0.00040603 seconds.

                  DROP TABLE IF EXISTS smf_tmp_log_search_topics
   in //Sources/Search.php line 1219, which took 0.00029898 seconds.

                  CREATE TEMPORARY TABLE smf_tmp_log_search_topics (
                     id_topic mediumint(8) unsigned NOT NULL default '0',
                     PRIMARY KEY (id_topic)
                  ) TYPE=HEAP
   in //Sources/Search.php line 1229, which took 0.00034499 seconds.

                     DELETE FROM smf_log_search_topics
                     WHERE id_search = 51
   in //Sources/Search.php line 1239, which took 0.0003891 seconds.

                     INSERT IGNORE INTO smf_log_search_topics
                        (id_search, id_topic)
                     SELECT 51, t.id_topic
                     FROM smf_topics AS t
                        INNER JOIN smf_log_search_subjects AS subj1 ON (subj1.id_topic = t.id_topic)
                     WHERE subj1.word LIKE '%session%'
                     LIMIT 1200
   in //Sources/Search.php line 1340, which took 0.00073504 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254153320, SUBSTRING(xxxxxxxxxxxxx, 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('512: \r<br />               INSERT IGNORE INTO {db_prefix}log_search_results\r<br />                     (id_search, relevance, id_topic, id_msg, num_matches)', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'general', SUBSTRING('//Sources/Search.php', 1, 255), 1566)
   in /home/vg001web01/54/40/2004054/web/Sources/Errors.php line 150, which took 0.0005579 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254153320, SUBSTRING('70.187.95.3', 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('1024: Parameters: 18 8 200 1 %session%', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'general', SUBSTRING('//Sources/Search.php', 1, 255), 1569)
   in //Sources/Errors.php line 150, which took 0.00042701 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254153320, SUBSTRING('70.187.95.3', 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('The database value you\'re trying to insert does not exist: id_search<br />Function: PlushSearch2', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'critical', SUBSTRING('//Sources/Search.php', 1, 255), 1587)
   in //Sources/Errors.php line 150, which took 0.00045013 seconds.

      UPDATE smf_log_activity
      SET
         hits = hits + 1
      WHERE date = '2009-09-28'
   in //Sources/Subs.php line 3009, which took 0.00043702 seconds.

               SELECT code, filename, description
               FROM smf_smileys
   in //Sources/Subs.php line 2524, which took 0.00034213 seconds.


Here is an unknown word search: (which never seems to give the DB error)

Templates: 3: index (The_PlayGround_Ultimate), Portal (default), Search (default).
Sub templates: 8: init, html_above, body_above, portal_above, results, portal_below, body_below, html_below.
Language files: 4: SPortal.english (The_PlayGround_Ultimate), index+Modifications.english (The_PlayGround_Ultimate), ThemeStrings.english (The_PlayGround_Ultimate), Search.english (The_PlayGround_Ultimate).
Style sheets: 2: index(The_PlayGround_Ultimate), portal(The_PlayGround_Ultimate).
Files included: 26 - 1041KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/Subs-Portal.php, ./Sources/LoadAds.php, ./Sources/Subs-Db-mysql.php, ./Sources/ManageMaintenance.php, ./Themes/default/languages/SPortal.english.php, ./Themes/The_PlayGround_Ultimate/index.template.php, ./Themes/default/languages/index.english.php, ./Themes/default/languages/Modifications.english.php, ./Themes/The_PlayGround_Ultimate/languages/ThemeStrings.english.php, ./Sources/PortalBlocks.php, ./SSI.php, ./Themes/default/Portal.template.php, ./Sources/Search.php, ./Themes/default/languages/Search.english.php, ./Themes/default/Search.template.php, ./Sources/Display.php, ./Sources/DbSearch-mysql.php, ./Sources/SearchAPI-Standard.php, ./Sources/Subs-Aeva.php)
Queries used: 24.

         SELECT variable, value
         FROM smf_settings
   in //Sources/Load.php line 158, which took 0.00169396 seconds.

      SELECT data
      FROM smf_sessions
      WHERE session_id = '093260e4d763e5e844c20293ae9563e4'
      LIMIT 1
   in //Sources/Load.php line 2252, which took 0.00043488 seconds.

            SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
            FROM smf_members AS mem
               LEFT JOIN smf_attachments AS a ON (a.id_member = 1)
            WHERE mem.id_member = 1
            LIMIT 1
   in //Sources/Load.php line 354, which took 0.00108004 seconds.

      SELECT *
      FROM smf_ads
      order by ADS_ID
   in //Sources/LoadAds.php line 29, which took 0.00038409 seconds.

         SELECT variable, value, id_member, id_theme
         FROM smf_themes
         WHERE id_member IN (-1, 0, 1)
            AND id_theme IN (4, 1)
   in //Sources/Load.php line 1333, which took 0.00039911 seconds.

            DELETE FROM smf_log_online
            WHERE log_time < 1254153306
               AND session != '093260e4d763e5e844c20293ae9563e4'
   in //Sources/Subs.php line 2652, which took 0.00045609 seconds.

         UPDATE smf_log_online
         SET log_time = 1254154206, ip = IFNULL(INET_ATON('70.187.95.3'), 0), url = 'a:2:{s:6:\"action\";s:7:\"search2\";s:10:\"USER_AGENT\";s:166:\"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 3.0.04506.30; Zune 3.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)\";}'
         WHERE session = '093260e4d763e5e844c20293ae9563e4'
   in //Sources/Subs.php line 2668, which took 0.00041199 seconds.

      SELECT
         spb.id_block, spb.label, spb.type, spb.col, spb.row, spb.state,
         spb.force_view, spb.allowed_groups, spb.permission_type, spb.display,
         spb.display_custom, spb.style, spp.variable, spp.value
      FROM smf_sp_blocks AS spb
         LEFT JOIN smf_sp_parameters AS spp ON (spp.id_block = spb.id_block)
      WHERE spb.state = 1
      ORDER BY spb.col, spb.row
   in //Subs-Portal.php line 309, which took 0.00050712 seconds.

         SELECT b.id_board
         FROM smf_boards AS b
         WHERE 1=1
   in //Sources/Search.php line 553, which took 0.0003109 seconds.

         SELECT COUNT(*)
         FROM smf_boards
   in //Sources/Search.php line 575, which took 0.00025296 seconds.

      DELETE FROM smf_log_floodcontrol
      WHERE log_time < 1254154204
         AND log_type = 'search'
   in //Sources/Subs.php line 3056, which took 0.00038481 seconds.

      REPLACE INTO smf_log_floodcontrol(`ip`, `log_time`, `log_type`)
      VALUES
         (SUBSTRING(xxxxxxxxxxxxx, 1, 16), 1254154206, 'search')
   in //Sources/Subs.php line 3064, which took 0.00032806 seconds.

      REPLACE INTO smf_settings(`variable`, `value`)
      VALUES
         (SUBSTRING('search_pointer', 1, 255), SUBSTRING('55', 1, 65534))
   in //Sources/Subs.php line 611, which took 0.00040197 seconds.

            DELETE FROM smf_log_search_results
            WHERE id_search = 55
   in //Sources/Search.php line 1007, which took 0.00035596 seconds.

                  DROP TABLE IF EXISTS smf_tmp_log_search_topics
   in //Sources/Search.php line 1219, which took 0.00034189 seconds.

                  CREATE TEMPORARY TABLE smf_tmp_log_search_topics (
                     id_topic mediumint(8) unsigned NOT NULL default '0',
                     PRIMARY KEY (id_topic)
                  ) TYPE=HEAP
   in //Sources/Search.php line 1229, which took 0.00032115 seconds.

                     DELETE FROM smf_log_search_topics
                     WHERE id_search = 55
   in //Sources/Search.php line 1239, which took 0.00033402 seconds.

                     INSERT IGNORE INTO smf_log_search_topics
                        (id_search, id_topic)
                     SELECT 55, t.id_topic
                     FROM smf_topics AS t
                        INNER JOIN smf_log_search_subjects AS subj1 ON (subj1.id_topic = t.id_topic)
                     WHERE subj1.word LIKE '%pouch%'
                     LIMIT 1200
   in //Sources/Search.php line 1340, which took 0.00059199 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254154206, SUBSTRING(xxxxxxxxxxxxx, 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('512: \r<br />               INSERT IGNORE INTO {db_prefix}log_search_results\r<br />                     (id_search, relevance, id_topic, id_msg, num_matches)', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'general', SUBSTRING('//Sources/Search.php', 1, 255), 1566)
   in //Sources/Errors.php line 150, which took 0.00052214 seconds.

      INSERT INTO smf_log_errors(`id_member`, `log_time`, `ip`, `url`, `message`, `session`, `error_type`, `file`, `line`)
      VALUES
         (1, 1254154206, SUBSTRING('70.187.95.3', 1, 16), SUBSTRING('?action=search2', 1, 65534), SUBSTRING('1024: Parameters: 18 8 200 1 %pouch%', 1, 65534), '8c7f339306105726b68d33d78bc20136', 'general', SUBSTRING('//Sources/Search.php', 1, 255), 1569)
   in //Sources/Errors.php line 150, which took 0.00042009 seconds.

                  INSERT IGNORE INTO smf_log_search_results
                     (id_search, relevance, id_topic, id_msg, num_matches)
                  SELECT
                     55,
                     1000 * (25 * COUNT(*) / (MAX(t.num_replies) + 1) + 25 * CASE WHEN MAX(m.id_msg) < 18 THEN 0 ELSE (MAX(m.id_msg) - 18) / 8 END + 20 * CASE WHEN MAX(t.num_replies) < 200 THEN MAX(t.num_replies) / 200 ELSE 1 END + 15 * 0 + 10 * CASE WHEN MIN(m.id_msg) = MAX(t.id_first_msg) THEN 1 ELSE 0 END + 5 * MAX(t.is_sticky)) / 100 AS relevance,
                     t.id_topic,
                     MAX(m.id_msg) AS id_msg,
                     COUNT(*) AS num_matches
                  FROM smf_topics AS t
                     INNER JOIN smf_messages AS m ON (m.id_topic = t.id_topic)
                  WHERE m.body LIKE '%pouch%'
                  GROUP BY t.id_topic
                  LIMIT 1200
   in //Sources/Search.php line 1587, which took 0.00078392 seconds.

         SELECT lsr.id_topic, lsr.id_msg, lsr.relevance, lsr.num_matches
         FROM smf_log_search_results AS lsr
         WHERE lsr.id_search = 55
         ORDER BY relevance desc
         LIMIT 0, 30
   in //Sources/Search.php line 1728, which took 0.00038099 seconds.

      UPDATE smf_log_activity
      SET
         hits = hits + 1
      WHERE date = '2009-09-28'
   in //Sources/Subs.php line 3009, which took 0.00037789 seconds.

               SELECT code, filename, description
               FROM smf_smileys
   in //Sources/Subs.php line 2524, which took 0.00038099 seconds.


I send a PM. Thx

Norv

I need to see your site in a debugger before knowing what is going on. I think a mod is interfering every once in the while. In any case, as said elsewhere, if it's possible for you to consider making available a copy of your files and database backup (I don't need anything else), it would be great. Please feel free to let me know in that case.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: