Skip to main content.
home | support | download

Back to List Archive

Re: [SWISH-E:180] Problem running AutoSwish

From: Eric Lee <ericlee(at)not-real.oise.utoronto.ca>
Date: Fri Apr 24 1998 - 17:20:37 GMT
On Thu, 5 Mar 1998, Eric Lee wrote:

> On my first attempt to run AutoSwish from the Quick Form I received the 
> following from swish_create.pl
> 
>      Error 500
> 
>      Internal error: execve() failed 
> 
>      CERN httpd 3.0
> 
> Can anyone suggest where things are going wrong and how to correct?

The "execve() failed" means that the server could not find the program 
it was being asked to run, in this case swish_create.pl

The httpd.conf for the CERN server has a directive that looks like it should
say how to find scripts which are not in the cgi root:

#       Scripts; URLs starting with /cgi-bin/ will be understood as
#       script calls in the directory /your/script/directory
#
# Works for scripts in cgi root, but not for those lower.
Exec    /cgi-bin/*                       /home/web/httpd/cgi-bin/*
#This doesn't work -- "execve() failed"
Exec    /cgi-bin/swish-bin/SwishCreate/* /home/web/httpd/cgi-bin/*
#This doesn't work -- "execve() failed"
Exec   /cgi-bin/swish-bin/SwishCreate/*  /home/web/httpd/cgi-bin/swish-bin/SwishCreate/*


However, I could not get it to do this.  If others know how, I'd like to 
hear because it would simplify much.

I worked around the problem by making a symbolic link in the cgi root to
swish-bin/SwishCreate/swish_create.pl and changing several paths in the
AutoSwish home page and swish_create.pl to refer to the cgi root rather
than the proper AutoSwish locations. 

However using this approach for full AutoSwish functions requires "777" 
permission on the cgi root, which may be a security risk.

Should others have to resort to the symbolic link technique, be sure the
permissions on your cgi root will support what swish_create.pl does when
it sets up the user scripts in "sub index".  swish_create is not expecting
trouble at this point and can't report errors: if it fails, what you get
in AutoSwish is a "Document Contains no Data" message after the indexing
step has been running a while. 

To allow swish_create to report errors here add in "sub index" something 
like (about line 263):

  ...
  }else{

  # Start some output to the browser
  &html_header("Indexing with SWISH-E: Step 2a, Setup");

  ...

  # Test the things swish_create is going to do and report if it will
  # fail if it tries.

   if ( ! -w "$CGIDIR" )
    { print "$CGIDIR cannot be written to. Cannot go on.<BR>";
      print "</BODY></HTML>\n";
      exit(1);
    }
    else { print "OK. $CGIDIR can be written to.<BR>\n";
           # This is what swish_create was going to do anyway.
           open (OUTFILE, ">$CGIDIR/$fileroot.pl");
           `chmod 777 $CGIDIR/$fileroot.pl`;
   }

   # Finish the page.
   print "</BODY></HTML>";

   ...

Eric Lee
ericlee@oise.utoronto.ca
Received on Fri Apr 24 10:33:32 1998