Re: htdig: Wrapper script for htsearch

J. op den Brouw (
Wed, 30 Sep 1998 17:08:17 +0200 (MET DST)

On Tue, 29 Sep 1998, John Grohol PsyD wrote:

> I am moving from a long-time relationship with Excite for
> Web Servers (EWS) to Htdig, after upgrading our OS and
> hardware. Since we have been online for 3 years, we've
> encouraged people to include a search engine interface
> on their Web page which calls the EWS script from our server.
> Naturally, the form is configured for EWS, not htsearch.

Done this on my site too.

> So I've written a wrapper script for htsearch which will
> parse the EWS form and send stuff htsearch likes to see.
> The problem is the wrapper works fine from the command
> line, but not when called as a CGI from the Web.
> I assume that, since the htdig config file can't be
> named in the form, I need to define the file somehow as an

Huh?? There is (normally) a hidden field "config" that
gets the name of the config file. If you mean that your
form doesn't have a hidden config field, read the next comment.

> environmental variable in the perl wrapper script?
> I'm not sure, but I think it has something to do with
> ensuring htsearch knows where the htdig.conf file is...
> and it doesn't right now.

What you need to do, is to reassemble the QUERY_STRING
environment variable, and call (exec) the real htsearch

In the QUERY_STRING you need to set all the parameters
htsearch would normaly get.

> I haven't been able to find any documentation surrounding
> calling htsearch from the command line and would appreciate
> any pointers or suggestions on how to get this wrapper to
> work. I'd be happy to share it with others who may also
> be upgrading from EWS to htsearch and want to make the old
> search form still work...

I have a script that I can send you (allthough it is not
written to work with but with

J. op den Brouw Johanna Westerdijkplein 75
Haagse Hogeschool 2521 EN DEN HAAG
Sector Techniek Netherlands
Afdeling Elektrotechniek +31 70 4458936
-------------------------- ---------------------------

htdig survey:

To unsubscribe from the htdig mailing list, send a message to containing the single word "unsubscribe" in
the body of the message.

This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:27:54 PST