Hi! Thanks for the fast response!

> Let's take this one step at a time. Let's make sure it's working as you
> want from the command line.
>
> > whether it's actually using the proper conf file (the output doesn't
> > really seem to give a clue one way or another).
>
> Sure it does. It should give the conf file in the HTML source for the
> form (e.g. on the nomatch page). But it sounds like it's going back to
> compiled-in defaults and can't open the databases. Have you changed config
> *directories* from when you installed it? Remember that htsearch needs to
> know the default config directory and compiles it in for security.

I made htdig using
./configure --prefix=/www/htnew --with-database-dir=/www/htnew/db

I'm assuming that all of htdig's directories are based on --prefix, so
explicitly setting prefix to /www/htnew should cause ANYTHING that would
otherwise go into /opt/www to go into /www/htnew instead (with conf being
/www/htnew/conf). The only reason I overrode the database dir was to keep it
from ending up in /www/htnew/var/db (where it presumably would have ended up
had I overriden only --prefix).

To test various htsearch config file possibilities, I tried a few
experiments:
*********************************
Experiment 1: -c, with full path and conf filename including extension
Officially, this one should NOT work, because it includes both the path and
extension of the config file, but it's the only one that seems to actually
find it...
/www/htnew/cgi-bin/htsearch -v -c /www/htnew/conf/cni-res-1.conf
"words=sales&format=long"
--------------------------------------------
tempWords: 'sales:0 '
Boolean: 'sales:0 '
initial: ''
Fuzzy on: sales
 word=sales prefix_suffix=* prefix_suffix_length=1 minimum_prefix_length=1
searchWords: 'sales:0 '
LogicalWords: sales
Pattern: sales
perform_push @0: sales
WordDB: DB->cursor: method meaningless before open
score: empty list, push 0 @0
term:factor
Content-type: text/html

********************************
Experiment 2: -c with full path, no extension
/www/htnew/cgi-bin/htsearch -v -c /www/htnew/conf/cni-res-1
"words=sales&format=long"
-------------------------------------------
Content-type: text/html

<html><head><title>htsearch error</title></head>
<body bgcolor="#ffffff">
<h1>ht://Dig error</h1>
<p>htsearch detected an error.  Please report this to the
webmaster of this site by sending an e-mail to:
<a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a
>
The error message is:</p>
<pre>
Unable to read configuration file '/www/htnew/conf/cni-res-1'
</pre>
</body></html>

********************************
Experiment 3: -c without path, with extension
/www/htnew/cgi-bin/htsearch -v -c cni-res-1.conf "words=sales&format=long"
-------------------------------------------
Content-type: text/html

<html><head><title>htsearch error</title></head>
<body bgcolor="#ffffff">
<h1>ht://Dig error</h1>
<p>htsearch detected an error.  Please report this to the
webmaster of this site by sending an e-mail to:
<a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a
>
The error message is:</p>
<pre>
Unable to read configuration file 'cni-res-1.conf'
</pre>
</body></html>

**********************************
Experiment 4: -c with neither path nor extension. Officially, this is the
one that should work...
/www/htnew/cgi-bin/htsearch -v -c cni-res-1 "words=sales&format=long"
---------------------------------------------
Content-type: text/html

<html><head><title>htsearch error</title></head>
<body bgcolor="#ffffff">
<h1>ht://Dig error</h1>
<p>htsearch detected an error.  Please report this to the
webmaster of this site by sending an e-mail to:
<a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a
>
The error message is:</p>
<pre>
Unable to read configuration file 'cni-res-1'
</pre>
</body></html>

************************************
On a hunch, I ran a second group of experiments, varying only the current
directory (Experiments 1-4 were run with /www/htnew as the current
directory).

The change made a difference only with one scenario: -c specifying the
config file without path, but with extension.
With /www/htnew/conf as the current directory, running
/www/htnew/cgi-bin/htsearch -v -c cni-res-1.conf "words=sales&format=long"
produced the same output as Experiment #1:
-----------------------------------------------
tempWords: 'sales:0 '
Boolean: 'sales:0 '
initial: ''
Fuzzy on: sales
 word=sales prefix_suffix=* prefix_suffix_length=1 minimum_prefix_length=1
searchWords: 'sales:0 '
LogicalWords: sales
Pattern: sales
perform_push @0: sales
WordDB: DB->cursor: method meaningless before open
score: empty list, push 0 @0
term:factor
Content-type: text/html

***********************************
I verified that all of the files in /www/htnew are owned by 'nobody' -- the
user under which the experiments above were conducted.
What do you suggest trying next?

Thanks!

-- Jeff


_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
Information: http://lists.sourceforge.net/lists/listinfo/htdig-general
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to