Skip to main content.
home | support | download

Back to List Archive

Re: swish.cgi is not returning results

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Fri Oct 04 2002 - 23:58:19 GMT
At 07:35 PM 10/04/02 -0400, Peggy Eaton wrote:
>The command line execution and debugging look fine 
>to me, and while the CGI script doesn't produce errors, I still get no 
>results.

I'm not sure what you mean.  I see results in your output of

>daacdev2$ export SWISH_DEBUG=dump; $DAACDIR/cgi-bin/swish.cgi > /dev/null

Typically, what happens is if just typing:

     ./swish.cgi 

generates output then the CGI script can probably be viewed from the web
server.  But that's CGI debugging and not a swish-e issue.

Now, if you have a problem where you just are not getting results, then you
can make use of the SWISH_DEBUG setting as you saw.  That lets you enter in
a query and see results at different stages of processing.  That makes is
easier to see that it's running swish and returning results.

For example you can capture the HTML output:

swish-e > SWISH_DEBUG=basic ./swish.cgi >outfile
Debug level set to: 1

---------- Read config parameters from '.swishcgi.conf' ------
$VAR1 = {
          'swish_binary' => './swish-e',
          'swish_index' => 'index.swish-e'
        };
-------------------------
Debug level set to: 1
Enter a query [all]: apache
Enter max results to display [1]: 
Found 1 results

swish-e > head outfile
Content-Type: text/html; charset=ISO-8859-1

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
       <title>
          190 Results for [apache]
       </title>
    </head>
    <body>

Now if that works, but it doesn't work on the web server, then it's a CGI
issue -- so look at the standard things, like permissions and the server's
error log.

Oh, and:

>I set up a .swishcgi.conf file that looks like:
>return {
>      Swish_Binary     => '/usr/daac/dev/bin/swish-e',
>      Swish_Index      => '/usr/daac/doc/internal/web/index.swish-e',
>};
>
>and even though the dump indicated the .swishcgi.conf was being read, 
>swish.cgi couldn't find the binary or index file until I changed them 
>directly in the script (for the moment, just a side issue).

Bah!  That's my fault.  I copy-n-pasted from your email to make sure I was
duplicating your setup, and I duplicated your errors. ;)  The config
settings were wrong (note the case).  Sorry about that.


swish-e > SWISH_DEBUG=basic ./swish.cgi >/dev/null
Debug level set to: 1

---------- Read config parameters from '.swishcgi.conf' ------
$VAR1 = {
          'swish_binary' => './swish-e-BAD',
          'swish_index' => 'index.swish-e'
        };
-------------------------
Debug level set to: 1
Enter a query [all]: apaceh
Enter max results to display [1]: 
Can't exec "./swish-e-BAD": No such file or directory at ./swish.cgi line
1535, <STDIN> line 2.
Child process Failed to exec './swish-e-BAD' Error: No such file or
directory at ./swish.cgi line 1536, <STDIN> line 2.
./swish.cgi Swish returned unknown output: 'Failed to exec Swish'

Failed to find any results
Service currently unavailable

> > Is .shtml a server generated page?
>yes, we designate web pages using server side includes with .shtml

Well, of course they won't have the includes when indexing with the file
system.

-- 
Bill Moseley
mailto:moseley@hank.org
Received on Sat Oct 5 00:02:03 2002