Hey,
I just did the rundig to index my web site. However, when I try to run the
search frmo my PHP page, nothing ever gets into the $result variable. Below
I've shown the code I'm using.
In my index.php that does the saerch is:
---
$HTSEARCH_PROG = "/home/sites/site21/web/_search/htdig.sh";
$words = EscapeShellCmd(UrlEncode($search));
$config = "roguespear";
$format = "roguespear";
$query = "config=$config&format=$format&words=$search";
$command="$HTSEARCH_PROG \"$query\"";
exec($command,$result);
$rc = count($result);
if($rc < 2)
{
title("Search - Error");
show_error("There was an error executing the search. Please try again
later.");
}
elseif($result[2] == "NOMATCH")
{
title("Search - No Matches");
show_error("There were no matches for <b>" . $search . "</b> on the web
site.");
}
elseif($result[2] == "SYNTAXERROR")
{
title("Search - Error");
show_error("There is a syntax error in your search for
<b>$search</b>:<br><br>" . $result[3] . "</PRE>\n");
}
else
{
*displays matches
}
----
The scripts always goes to the show_error("There was an error executing the
search. Please try again later.");
Here is the contents of my rundig.sh that I call up when executing the
search:
---
#!/bin/sh
HTBINDIR=/home/sites/site21/local/htdig/bin
QUERY_STRING="$@"
REQUEST_METHOD=GET
export QUERY_STRING REQUEST_METHOD
$HTBINDIR/htsearch
---
Here is the contents of my roguespear.conf file:
---
database_dir: /home/sites/site21/local/htdig/db/roguespear
start_url: http://www.roguespeardatabase.com/
limit_urls_to: ${start_url}
exclude_urls: /cgi-bin/ .cgi admin forum _search
bad_extensions: .wav .gz .z .sit .au .zip .tar .hqx .exe .com .gif \
.jpg .jpeg .aiff .class .map .ram .tgz .bin .rpm .mpg .mov .avi
maintainer: [EMAIL PROTECTED]
max_head_length: 60000
max_doc_size: 200000
no_excerpt_show_top: true
search_algorithm: exact:1 synonyms:0.5 endings:0.3
excerpt_length: 200
next_page_text: 1
no_next_page_text: 0
prev_page_text: 1
no_prev_page_text: 0
template_map: roguespear roguespear
/home/sites/site21/web/_search/results-template.html
search_results_header: /home/sites/site21/web/_search/results-header.html
search_results_footer:
nothing_found_file: /home/sites/site21/web/_search/results-nomatch.html
syntax_error_file:
/home/sites/site21/web/_search/results-syntaxerror.html
star_image: http://www.roguespeardatabase.com/_images/on.gif
star_blank: http://www.roguespeardatabase.com/_images/off.gif
max_stars: 5
max_doc_size: 100000
valid_punctuation: .-_/!#$%^&*'��"
use_meta_description: true
start_highlight: <font color="#FF0000">
end_highlight: </font>
---
Anyone have an idea what's going on and why no search results are found? I
really want to get this thing to work.
Thanks in advance for any help. Let me know if more information is needed.
Btw, just on a side-not, I follwed this tutorial to get where I am at:
http://www.devshed.com/Server_Side/PHP/Search_This/
Thanks
Mike
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html
[htdig] Getting Error when trying to run a searching
Michael \"NightEye\" Aeberhard Wed, 04 Jul 2001 07:38:06 -0700
- Re: [htdig] Getting Error when tr... Michael \"NightEye\" Aeberhard
- Re: [htdig] Getting Error wh... Gilles Detillieux

