Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: plusev on July 21, 2009, 07:40:06 PM

Title: Search Error
Post by: plusev on July 21, 2009, 07:40:06 PM
Do any search yeilds

The database value you're trying to insert does not exist: id_search

Please advise. Thx
Title: Re: Search Error
Post by: Arantor on July 21, 2009, 09:56:15 PM
Is there any more information in the error log than that?
Title: Re: Search Error
Post by: plusev on July 21, 2009, 10:59:32 PM
Nothing in the log. It's only once in a while now.
Title: Re: Search Error
Post by: H on July 31, 2009, 04:39:04 PM
Are you using a search index? See: Search (http://docs.simplemachines.org/index.php?board=69.0;sort=subject)
Title: Re: Search Error
Post by: plusev on July 31, 2009, 04:45:38 PM
Actually I think I found the issue. I have a few test posts named "test" so I did a search for "test" to see if search was functioning correctly. Thats when I got the error. All other searchs seems to work.

+EV
Title: Re: Search Error
Post by: H on August 04, 2009, 02:11:05 PM
Its good that it isn't happening all the time but you may still want to look at fixing it. If you're using a search index you can try rebuilding it
Title: Re: Search Error
Post by: plusev on August 04, 2009, 02:13:59 PM
I have no index and it was the first search I ever did. Only 2 posts and 1 member in the test forum. It just freaked when I searched for the term "test"

Thx
Title: Re: Search Error
Post by: plusev on August 05, 2009, 12:11:20 AM
Now if I enter the word test into my search I get the following error -

The database value you're trying to insert does not exist: id_search
Function: PlushSearch2

please advise
Title: Re: Search Error
Post by: Norv on August 05, 2009, 02:02:48 AM
Can you please make sure you paste the entire error message here?

Or, make a screenshot with it, if you can.
Title: Re: Search Error
Post by: plusev on August 06, 2009, 01:13:13 AM
The database value you're trying to insert does not exist: id_search

Is the actual error on the search page. Attached is the error log.

Thx
Title: Re: Search Error
Post by: Norv on August 06, 2009, 11:19:48 AM
It seems your database may be missing a field from a table. I wonder how that could happen.
Can you please run the following query in phpMyAdmin, and copy paste or screenshot here the results:

SHOW COLUMNS FROM smf_log_search_results

( What is phpMyAdmin? (http://www.simplemachines.org/community/index.php?topic=21919.0) )
Title: Re: Search Error
Post by: plusev on August 08, 2009, 10:24:07 PM
You were correct. How a missing table?? No idea but thankfully fixed. Thx for pointing me in the right direction.
Title: Re: Search Error
Post by: Norv on August 09, 2009, 05:41:13 AM
Cheers, great to hear you got it sorted out!
Title: Re: Search Error
Post by: plusev on September 08, 2009, 01:42:05 AM
Still not able to search. Getting this error:

An Error Has Occurred!
The database value you're trying to insert does not exist: id_search 

From error log:

Type of error: Critical
The database value you're trying to insert does not exist: id_search
Function: PlushSearch2
File: //web/Sources/Search.php
Line: 1567 


Title: Re: Search Error
Post by: Norv on September 08, 2009, 02:27:03 AM
Quote from: Norv on August 06, 2009, 11:19:48 AM
Can you please run the following query in phpMyAdmin, and copy paste or screenshot here the results:

SHOW COLUMNS FROM smf_log_search_results

( What is phpMyAdmin? (http://www.simplemachines.org/community/index.php?topic=21919.0) )

Eventually, please attach your ./Sources/Search.php as well, I wonder if meanwhile a mod might have changed it.
Title: Re: Search Error
Post by: plusev on September 12, 2009, 11:52:53 PM
SQL-query:
SHOW COLUMNS FROM smf_log_search_results 
[Edit] [Create PHP Code] [Refresh]

Field  Type  Null  Key  Default  Extra 
id_search tinyint(3) unsigned NO PRI 0   
id_topic mediumint(8) unsigned NO PRI 0   
id_msg int(10) unsigned NO   0   
relevance smallint(5) unsigned NO   0   
num_matches smallint(5) unsigned NO   0   


________________

Sorry for the delay, Thx
Title: Re: Search Error
Post by: Norv on September 14, 2009, 03:29:28 AM
I see nothing obviously wrong in the file and table.

Could you please make sure you enable the option to "log database queries" from your administration panel. Then try searching again. Perhaps it will tell us more about the error.
Title: Re: Search Error
Post by: plusev on September 14, 2009, 11:14:00 AM
"Include database query in the error log" was enabled. Is that the same as "log database queries"?
Title: Re: Search Error
Post by: Norv on September 16, 2009, 06:16:56 AM
Yes, that one...
Please, instead, use this file, and make a search. It will log the exact query (in your forum error log). Please copy and paste it here.
It's only meant to log the query, so please just use it once to see the log, then replace it back with your original file.

(rename the file to Search.php :) )
Title: Re: Search Error
Post by: plusev on September 16, 2009, 01:06:59 PM
Here is the error log entry:

512:
INSERT IGNORE INTO {db_prefix}log_search_results
(id_search, relevance, id_topic, id_msg, num_matches)
File: /Sources/Search.php
Line: 1565 

==>1565: LIMIT ' . $modSettings['search_max_results']), E_USER_WARNING);

Thx
Title: Re: Search Error
Post by: Norv on September 16, 2009, 01:45:18 PM
That's still as expected.
Please, can you do the same with this file? I inserted another error log entry, with the values themselves, and a notice about supporting ignore, please tell if they appear in the log.
Title: Re: Search Error
Post by: plusev on September 16, 2009, 01:53:44 PM
1024: The database doesn't support ignore
File: //Sources/Search.php
Line: 1570 

==>1570: trigger_error("The database doesn't support ignore");

and

1024: Parameters: 14 7 200 1 %game%
File: //Sources/Search.php
Line: 1567 

==>1567: trigger_error("Parameters: " . implode(' ', $main_query['parameters']));
Title: Re: Search Error
Post by: Norv on September 16, 2009, 02:28:34 PM
Please, log in phpMyAdmin, and first of all make a full backup (you can use export in phpMYyAdmin).
Then, empty the table smf_log_search_results (do not drop it, just empty it).
Then, please try running "check", and "repair" on it.
Title: Re: Search Error
Post by: plusev on September 17, 2009, 01:22:26 AM
Here is a SS of my export. Not that straight forward. Is there anything I should or should not be checking off in the boxes shown? I just want to make sure the export/backup goes well before I do anything else.

Thx
Title: Re: Search Error
Post by: Norv on September 17, 2009, 01:26:36 AM
I would add: check "add drop table", "add if not exists", "complete inserts".

Then, check "save as file", and choose (or not) whatever compression you wish (without it, the file might be big to download, with it, it can take more time to process).
Title: Re: Search Error
Post by: plusev on September 17, 2009, 01:38:21 AM
Emptied, ran check and repair (both showed Status OK) but still the same errors in log and on search page of forum.

Thx
Title: Re: Search Error
Post by: Norv on September 17, 2009, 02:05:17 AM
This is a weird one. Please, can you look into your sources folder, and find the files with "mysql" in their name, as well as those with "Search" in their names, .zip them together and attach them here? Or even all your Sources directory, can't be big if zipped, and there are only sources files anyway (nothing confidential about that :) ).

Or, are you still on the test forum with 2 posts and 1 user as you said before? It might help if I could see it happening, along with the database, so perhaps you would consider to also make available a backup of the database. In case you agree, please let me know so I can send you an account to use.
Title: Re: Search Error
Post by: plusev on September 22, 2009, 12:43:01 PM
Here are the search/mysql files. If you need more of the backup db. let me know. Thx for your help.
Title: Re: Search Error
Post by: Norv on September 22, 2009, 12:51:11 PM
I'll take a look as soon as soon as possible, though that may be only in about 12 hours.
A backup of the database might be useful, as I intend to try replicating the error.
Title: Re: Search Error
Post by: Norv on September 23, 2009, 08:38:22 AM
Please confirm if my understanding is correct (and still true): you are only getting this error when you try to search for the word "test". Other searches work just fine. You have a topic named 'test' on your forum. You don't use a search index.
Title: Re: Search Error
Post by: plusev on September 23, 2009, 11:51:49 AM
I get the error on all search terms.

I do not use a search index.

Thx
Title: Re: Search Error
Post by: Norv on September 26, 2009, 11:13:21 AM
Please add in your Settings.php file:
Code (find) Select

$db_error_send = 1;

(the value of the variable above might be 0 as well)
Code (add after) Select

$db_show_debug = true;


It will enable a lot of debugging information for your forum (please DON'T use this setting in a production environment). Then, run a search, and in the page with the search result, you will see information at the bottom of the page. Set it to show queries as well, and please copy paste it here.
Title: Re: Search Error
Post by: Arantor on September 26, 2009, 11:22:12 AM
Isn't it just $db_show_debug = true?

(=== means evaluate as identical to, not set the value?)
Title: Re: Search Error
Post by: Norv on September 26, 2009, 11:25:06 AM
Sure is. D'oh.
Corrected in the post, thank you!
Title: Re: Search Error
Post by: plusev on September 26, 2009, 09:08:27 PM
Warning: INSERT IGNORE INTO {db_prefix}log_search_results (id_search, relevance, id_topic, id_msg, num_matches) in //Sources/Search.php on line 1565

Notice: Parameters: 18 8 200 1 %pokerstars% in //Sources/Search.php on line 1567

Notice: The database doesn't support ignore in //Sources/Search.php on line 1570

This is the info that shows. Same for any search term.

Thx
Title: Re: Search Error
Post by: Arantor on September 27, 2009, 10:09:08 AM
What database are you using?
Title: Re: Search Error
Post by: plusev on September 27, 2009, 11:24:43 AM
I'm not sure what you mean. Using the mysql and no search index.

Thx
Title: Re: Search Error
Post by: Arantor on September 27, 2009, 11:30:29 AM
What version of MySQL ?
Title: Re: Search Error
Post by: plusev on September 27, 2009, 11:36:31 AM
5.0.51a
Title: Re: Search Error
Post by: Arantor on September 27, 2009, 11:38:47 AM
Hmm.

What type of table is the log_search_results table?
Title: Re: Search Error
Post by: plusev on September 27, 2009, 11:54:40 AM
Not sure. How would I find that out?
Title: Re: Search Error
Post by: 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?
Title: Re: Search Error
Post by: 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.
Title: Re: Search Error
Post by: plusev on September 27, 2009, 12:45:18 PM
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?
Title: Re: Search Error
Post by: plusev on September 27, 2009, 12:51:34 PM
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.
Title: Re: Search Error
Post by: Norv on September 27, 2009, 03:42:01 PM
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).
Title: Re: Search Error
Post by: Arantor on September 27, 2009, 03:54:43 PM
Norv, it's all there in the second code block.

I don't see the relevant query mentioned though.
Title: Re: Search Error
Post by: Norv on September 27, 2009, 04:08:38 PM
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?
Title: Re: Search Error
Post by: plusev on September 27, 2009, 05:33:19 PM
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')
Title: Re: Search Error
Post by: Norv on September 28, 2009, 05:58:00 AM
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?
Title: Re: Search Error
Post by: plusev on September 28, 2009, 10:42:45 AM
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
Title: Re: Search Error
Post by: Norv on September 28, 2009, 11:09:00 AM
I searched for "myself", a word which has one result, it exists in a post, however, I did not have any error. (as guest).
Title: Re: Search Error
Post by: plusev on September 28, 2009, 11:24:14 AM
Thats strange, as a guest the search seems to work.
Title: Re: Search Error
Post by: Norv on September 28, 2009, 11:28:01 AM
Can you please try to use the previously attached file?
Title: Re: Search Error
Post by: plusev on September 28, 2009, 12:14:07 PM
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
Title: Re: Search Error
Post by: Norv on October 04, 2009, 02:50:27 PM
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.