I have been able to search the database now, but there are no results in
the return ad you can see by going to this page.
http://www.chieftain.com/new_search/htdig_search.html
Also from the command line this is what I am getting using the exact
query line from the php class that you can see on the page above.
The class is avalible from http://phpclasses.upperdesign.com
REQUEST_METHOD=GET
QUERY_STRING="words=pueblo&format=weekly&matchesperpage=10&method=or&pag
e=1" /home/htdig/bin/../cgi-bin/htsearch -c /home/htdig/conf/weekly.conf
Content-type: text/html
194
1
10
pueblo
1
10
As you can see there is no titles or exerpts just the
MatchCount,FirstMatch,LastMatch,Words,first,last.
Getting farther now but this one has me stuck good.
Brian
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Michael
"NightEye" Aeberhard
Sent: Thursday, July 12, 2001 1:04 PM
To: Brian Paulson; [EMAIL PROTECTED]
Subject: RE: [htdig] Can't get htsearch to work with PHP
Brian - I jsut got it working and I am getting that same error as well.
What I did to fix it was just omit the wrapper script all together and
give the query directly to htsearch (ty Gilles R. Detillieux).
But now I am getting that same error as you are. I'll let you know if I
fix it.
Anyone out there that knows what's wrong, please help!
Thanks,
Mike
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Brian
Paulson
Sent: Thursday, July 12, 2001 2:33 AM
To: 'Michael "NightEye" Aeberhard'; [EMAIL PROTECTED]
Subject: RE: [htdig] Can't get htsearch to work with PHP
I am working on this exact same thing at the moment.
I was getting the same error message until I added a ./ to htsearch.sh
$title = "Search results";
$HTSEARCH_PROG="./htsearch.sh";
^ this made it work.
if (!isset($words)) {
$words = EscapeShellCmd(UrlEncode($search));
}
$config = $config;
$format = $config;
if (!isset($page)) {
$page = 1;
}
$query =
"config=$config&method=$method&format=$config&words=$words&page=$page";
$command="$HTSEARCH_PROG \"$query\"";
Now I am getting to htsearch ok but now I am getting the error
Showing results -
ht://Dig error
The error message is:
(Unable to read word database file '/home/htdig/db/db.words.db'% match)
^ for some reason the
/weekly/ dir is not being inserted
in
my conf dir I have the database_dir listed as
/home/htdig/db/weekly/
Any one have any ideas?
Thank You
Brian Paulson
Sr. Web Developer
The Pueblo Chieftain
http://www.chieftain.com
[EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Michael
"NightEye" Aeberhard
Sent: Thursday, July 12, 2001 7:59 AM
To: [EMAIL PROTECTED]
Subject: [htdig] Can't get htsearch to work with PHP
I've been trying to get PHP to work with htsearch and have had NO luck
at all. I've gotten it compiled, installed and indexed, but when I run
the .php, IT DOES NOT WORK.
I followed the Search This! tutorial. When I run the script and do a
var_dump on the $result, it prints out "int(126)" <-- anyone know what
the heck this means?
Anyway, here's the code in my .php:
$HTSEARCH_PROG = "/home/sites/site21/local/htdig/htdig.sh";
$words = EscapeShellCmd(UrlEncode($search));
$config = "roguespear";
$format = "roguespear";
$query = "config=$config&format=$format&words=$search";
$command="$HTSEARCH_PROG \"$query\""; passthru($command,$result);
$rc = count($result);
var_dump($result);
if($rc < 2)
{
title("Search - Error");
show_error("There was an error executing the search. Please try
again later.<br><br>"); } 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 {
Show matches
----
The error that always comes out is "There was an error executing the
search. Please try again later".
Anyone at all who can help me on this to get this working it would be
greatly apprecaited. I really want this to work, but it's just killing
me that it won't and I don't know what's wrong.
Please help me out. Thanks in advance.
- Mike Aeberhard
http://www.roguespeardatabase.com/
_______________________________________________
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-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-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