The command line works perfectly for me - but I put the query in quotes and
specify a config and format, ie:

./htsearch "config=myconfig&format=format&words=something"

Command line works like a charm, but when I call the SAME line from PHP, I
get this error:

ht://Dig error


htsearch detected an error. Please report this to the
webmaster of this site. The error message is:



Unable to read word database file
'/home/sites/site21/local/htdig/db/db.words.db'Did you run htmerge?

What I'm thinking is that my query from the PHP isn't getting to the
htsearch.  Here's my PHP code:

$words = EscapeShellCmd(UrlEncode($search));
$config = EscapeShellCmd(UrlEncode("roguespear"));
$format = EscapeShellCmd(UrlEncode("roguespear"));
$query = "config=$config&words=$words&format=$format";

$command="/home/sites/site21/local/htdig/bin/htsearch \"$query\"";
echo $command;
exec($command,$result);

This is starting to go beyond frusteration for me - CAN ANYONE HELP?  lol -
thanks

- Mike

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Dan
Langille
Sent: Monday, July 16, 2001 12:07 PM
To: Brian Paulson
Cc: [EMAIL PROTECTED]
Subject: Re: [htdig] Htsearch only returning header.


On 15 Jul 2001, at 21:54, Brian Paulson wrote:

>  All that happens when I run htsearch via my php script or via
> the command line all I get is
>
> Content-type: text/html
>

Brian isn't alone:

[dan@xeon:/freebsddiary/www/cgi-bin] $ ./htsearch words=things
Content-type: text/html

[dan@xeon:/freebsddiary/www/cgi-bin] $

--
Dan Langille
pgpkey - finger [EMAIL PROTECTED] | http://unixathome.org/finger.php

_______________________________________________
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

Reply via email to