> Show us ls -l /home/sites/site21/local/htdig/db/db.words.db Thats the point, it doesn't exist. My db files are in /home/sites/site21/local/htdig/db/roguespear/db.words.db and I do have in my config file database_dir: /home/sites/site21/local/htdig/db/roguespear So what I'm guessing is that my query isn't getting to the htsearch program. as for a PHP wrapper, that does not seem to work - I get an error: "not a legal variable name" in my web server's error log when I do it with a wrapper method. And to my knowledge, a wrapper is not needed. The PHP Class from http://phpclasses.upperdesign.com/ does it without wrapper - so I know it works without it. - Mike -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Langille Sent: Monday, July 16, 2001 12:34 PM To: Michael NNightEye Aeberhard Cc: [EMAIL PROTECTED] Subject: RE: [htdig] Htsearch only returning header - PHP problem too! On 16 Jul 2001, at 12:25, Michael "NightEye" Aeberhard wrote: > 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" I suspect it's something I've done with the configure stage: [dan@xeon:/freebsddiary/www/cgi-bin] $ ./htsearch "method=and;format=long;sort=score;config=htdig;restrict=;exclude =;submit=;words=things" Content-type: text/html [dan@xeon:/freebsddiary/www/cgi-bin] $ > 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? Show us ls -l /home/sites/site21/local/htdig/db/db.words.db > 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\""; I don't call htsearch directly. I use a wrapper: $HTSEARCH_PROG = "/home/freebsddiary/configuration/htdig/htdig.sh"; $command="$HTSEARCH_PROG \"$query\""; exec($command,$result); $ more /home/freebsddiary/configuration/htdig/htdig.sh #!/bin/sh # # This is a php wrapper for use with htdig (http://www.htdig.org/) # this source code can be obtained from: # http://freebsddiary.org/samples/htdig-php-wrapper.tar.gz # # HTBINDIR needs to be set to the cgi-bin directory in which htsearch resides # HTBINDIR=/home/freebsddiary/www/cgi-bin QUERY_STRING="$@" REQUEST_METHOD=GET export QUERY_STRING REQUEST_METHOD $HTBINDIR/htsearch > echo $command; > exec($command,$result); -- 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
RE: [htdig] Htsearch only returning header - PHP problem too!
Michael \"NightEye\" Aeberhard Mon, 16 Jul 2001 09:35:47 -0700
- RE: [htdig] Htsearch only returni... Michael \"NightEye\" Aeberhard
- RE: [htdig] Htsearch only re... Dan Langille
- Michael \"NightEye\" Aeberhard

