According to "Michael \"NightEye\" Aeberhard":
> 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);
[snip]

Well, I have no PHP experience, but maybe I can help weed out some
problems.  First of all, if you're running htdig 3.1.5, you don't
really need the "htdig.sh" wrapper script anymore.  You can now pass
the query string directly as an argument to htsearch.  In any case,
make sure htsearch is executable, and make sure that the wrapper script
is executable as well if you're using it.  Then, try running htsearch or
htdig.sh manually from the command line, giving it a typical query string
as an argument, to make sure at least that much is working correctly.

> 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
> ---

I assume you mean htdig.sh, and not rundig.sh, above.  This is the wrapper
script that PHP uses to call htsearch and give it the query string, right?

> Here is the contents of my roguespear.conf file:
[snip]
> Anyone have an idea what's going on and why no search results are found?  I
> really want to get this thing to work.

Lastly, I suggest checking the file modes (permissions) on all your
template files, database files, config file, and all directories leading
up to these.  They must all be readable, and the directories must all
be executable, by the user ID under which the web server runs.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

_______________________________________________
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