Topic: Search mySQL Error

Hi,

Recently the search on our Forums have stopped working;

http://nwcryobank.com/forum/search/?s=sheldon

An error was encountered

Note: For detailed error information (necessary for troubleshooting), enable "DEBUG mode". To enable "DEBUG mode", open up the file config.php in a text editor, add a line that looks like "define('FORUM_DEBUG', 1);" (without the quotation marks), and re-upload the file. Once you've solved the problem, it is recommended that "DEBUG mode" be turned off again (just remove the line from the file and re-upload it).



Turning DEBUG on, I get the following error;

An error was encountered

The error occurred on line 682 in /usr/local/www/htdocs/nwcryobank.com/www/forum/include/search_functions.php

Database reported: Query was empty (Errno: 1065).

function get_search_results($query, &$search_set)
{
    global $forum_db, $forum_user, $forum_page, $lang_common;

    $return = ($hook = get_hook('sf_fn_get_search_results_start')) ? eval($hook) : null;
    if ($return != null)
        return $return;

    $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); // line 682

I have updated to the latest versions, and have rebuilt the index in the administration.

Re: Search mySQL Error

What kind of values do you see in phpmyadmin for

    search_cache                          
    search_matches            
    search_words

maybe import them from backup db if empty... (excl. 1 one  above)

Re: Search mySQL Error

Hi;

search_cache  is empty;
search_matches is huge -> http://cl.ly/1jbn
search_words is equally huge -> http://cl.ly/1j4L

should I empty these ?

Re: Search mySQL Error

No better leave it for mom.
Another question: Are the old and the new forum running the same version of MySQL? or what versions were/are they running...

Re: Search mySQL Error

the Server is running mySQL 5.0.33 PHP
PHP Version 5.2.5

These havnt changed, nothing has changed, the search just stopped ?

Re: Search mySQL Error

I'd try and contact your hosts support and explain that you haven't changed anything and suddenly getting MySQL error above.

I believe I had something similiar once and contacted my support them, turned out they had updated something/ newer version etc.

Tell them exactely when it stopped working etc....

Re: Search mySQL Error

We own/manage the server, and I am 99.99997 % sure no one altered anything.
But . I will check with everyone and make sure.

Thanks