Skip to main content.
home | support | download

Back to List Archive

Re: Cmd Search OK, swish.cgi Search 0 results

From: Bill Moseley <moseley(at)>
Date: Mon Oct 18 2004 - 17:47:42 GMT
On Mon, Oct 18, 2004 at 10:38:40AM -0700, Smith, Sarah wrote:
> I can search fine from the command line, but when I go to search using
> swish.cgi (or any other .cgi/.pl script), I get 0 results. (no errors,
> and everything compiles, just no results). I checked the archives and no
> one with this problem had a reply posted.
> Here's my .swishcgi.conf that I use with swish.cgi:
> return {
>    swish_binary    => '/Program Files/SWISH-E',
>    swish_index     => '/Data/webroot/cgi-bin/index.swish-e',
>    title  => 'Search Intranet',
> };

When you say swish.cgi is that run via a web server, or also form the
command line?

Running perldoc swish.cgi has a lot of information on debugging.
Basically, if you can search from the command line you can then search
using swish.cgi from the command line and with debugging enabled you
can watch the command passed to swish and see the results.  That will
show you any differences.

If you are running on IIS then there can be problems with paths since
IIS doesn't do a chdir to the location of the CGI script like other
webservers do.  That just means you need to specify the absolute path.

I can't really offer any help with the other script.

> #Here's where it supposedly searches. 
> $count = 0; 
> open(SWISH, "$swish -w $query -f index1"); # -m $results $search_tags -f $index1|"); 

You forgot your pipe there.  Also, that's considered an insecure way
to run swish.

Bill Moseley

Unsubscribe from or help with the swish-e list:

Help with Swish-e:
Received on Mon Oct 18 10:48:30 2004