Re: [htdig] Problem with integrating php and htdig

Subject: Re: [htdig] Problem with integrating php and htdig
From: Gilles Detillieux (
Date: Mon Oct 16 2000 - 10:11:25 PDT

According to Nick Seacroft:
> A search engine is installed and working. The search needs to be run
> from php. php4 is installed and working on the server. A blank page is
> displayed instead of search results. Below is the code in results.php. Is
> there something missing? Do we need a $format entry? Is the exec line
> correct?
> <?php
> $HTSEARCH_PROG = "/home/httpd/INSuk/search/";
> $words = EscapeShellCmd(UrlEncode($search));
> $config = "insuk";
> $query = "config=$config&format=$format&words=$words";
> $command="$HTSEARCH_PROG \"$query\"";
> exec($command,$result);
> ?>

I don't see any errors in the code above, but I'm no PHP expert. I do
have to ask, though, are you sure the script referenced above
does indeed call htsearch, passing it its argument as a quoted string?
You may want to manually call this script with a query string argument
constructed as above, to make sure it's working as it should. Also,
if you haven't already done so, please read the "Search This" guide to
using PHP with htsearch.


Gilles R. Detillieux              E-mail: <>
Spinal Cord Research Centre       WWW:
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------ To unsubscribe from the htdig mailing list, send a message to You will receive a message to confirm this. List archives: <> FAQ: <>

This archive was generated by hypermail 2b28 : Mon Oct 16 2000 - 10:16:19 PDT