Re: htdig: htsearch logging problem


Doug (DougB@simplenet.com)
Thu, 21 Jan 1999 15:37:21 -0800


Gilles Detillieux wrote:
>
> Just a hunch, but do the core dumps happen only when testing htsearch
> from the command line, or do they happen when running searches from
> your browser too? If it's just from the command line, it may be that
> your syslog is dying when it tries to access the NULLs returned by
> getenv() for variables that are undefined (REMOTE_HOST & HTTP_REFERER).
>
> When run by the http server, these variables should be defined, so I
> can't imagine what else would be the problem, if htsearch dumps core
> even then. If this is the case, you'll need to poke around in logSearch()
> to see what's failing. Given that the problem is happening in strlen(),
> called indirectly from syslog(), the most likely culprit is a NULL string
> pointer, i.e. char * 0 (as opposed to an empty string), being passed as
> an argument to syslog().

        *Nod* I suspected this to be the case, and no, I'm not doing it from
the command line, I'm doing it with a real browser, search page, etc. On
the same hunch I thought I'd give commenting out the empty "restrict"
and "exclude" variables from the form, but that didn't help either. INRE
other possibly unset variables, we're using apache, so my understanding
is that all of the "normal" variables should be filled in. When I run
apache's "test.cgi" as a cgi script all the environment variables it
lists have values. Although come to think of it... our servers don't
always fill in remote_host, in fact it's not always possible to fill it
in if the IP doesn't have a PTR record or it is misconfigured. Also,
looking it up is a toggle in apache which is defaulted to OFF. So if
htdig's logging routine is relying on remote_host having a value that
should probably be conditionalized.

        If there is something else I can take a look at I'll be glad to,
however now that this project is basically finished the boss is
redirecting my attention to other areas. If someone comes up with a
patch I could test it to see if it helps, but I won't be able to work on
it myself (which isn't saying much given my lack of C++ ability :).

        On a slightly related note, once the webmaster puts the final touches
on the nooks and crannies our site's search engine is going to go
public, probably this upcoming monday. Is this the appropriate forum to
announce a "Hey, take a look at this!" type post, and if not can someone
point me to one? :) We'd also like to be included in the list of sites
that use htdig if that's appropriate.... the boss is *really* happy with
the end product, so once again my thanks.

Doug
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-request@sdsu.edu containing the single word "unsubscribe" in
the body of the message.



This archive was generated by hypermail 2.0b3 on Mon Jan 25 1999 - 08:15:24 PST