On Fri, Apr 02, 2004 at 06:18:30AM -0800, tim barrett wrote:
> I am running SWISH-E under windows XP and IIS 5.1 and I am trying to
> connect to it using CGI
>
> I have successfully indexed and returned results using swish-e at the
> perl command line but I cannot return results using CGI
>
>
> What am I doing wrong?
Hi Tim,
I can't offer much help with IIS but your script below is broken.
you need to print content-type and the open() statement is wrong. It's
not opening swish-e as a pipe and doesn't check for errors.
CGI is just a program that returns output in a speccific format. So if
it works on the command line and doesn't with the web server you need to
think about how those two environments differ.
>
> Thanks
>
> Tim
>
> > $count=0;
> >
> > print <<EOH;
> >
> > <html>
> > <head>
> > <title>Test</title>
> > </head>
> > <BODY>
> >
> > EOH
> >
> > open(SWISH, "c:\progra~1\SWISH-E\swish-e -w materials -m 10 -f c:\inetpub\wwwroot\cgi-bin\nln.index");
> > while (<SWISH>) {
> > $count++;
> > print "<p>found one</p>"
> > }
> > close SWISH;
> >
> > print <<EOB;
> >
> > <h1>$count Results returned This Time</h1>
> > </BODY>
> >
> > EOB
>
>
>
>
>
>
--
Bill Moseley
moseley@hank.org
Received on Fri Apr 2 07:43:15 2004