Skip to main content.
home | support | download

Back to List Archive

Re: [XWarn] RE: Re: Fixing Swish 2.4.0 To Work on W

From: Ahmad, Zeeshan (FMC) <Zeeshan.Ahmad(at)not-real.fmc.sa.gov.au>
Date: Fri Dec 12 2003 - 05:37:21 GMT
Another perl script problem on Windows.

Swish.cgi works fine when called directly from web browser (use lib qw
(./lib))

I am trying to execute it from an asp page
  <!-- #include virtual="/swish/swish.asp"-->

To do this Swish.cgi needs ASP tags, like
<%@ Language=PerlScript%>
<%
..
swish.cgi code
..
%>

When I run it, Perl can't locate SWISH::ParseQuery.pm (not found in @INC
stuff). I tried different use lib settings (including original) but of no
avail.

If I change 
'use SWISH::ParseQuery' to 
'use lib qw (E:/Program
Files/swish-e/lib/swish-e/perl/SWISH/ParseQuery.pm)', it works. Note this is
my installed path.

Then I would need to fix TemplateDefault location etc. similarly...what a
pain. I think it's a Perl engine issue.

Any ideas how to fix it?


Zeeshan Ahmad,
FMC Computing Services


-----Original Message-----
From: swish-e@sunsite.berkeley.edu [mailto:swish-e@sunsite.berkeley.edu] On
Behalf Of moseley@hank.org
Sent: Wednesday, 12 November 2003 12:57 AM
To: Multiple recipients of list
Subject: [SWISH-E] Re: [XWarn] RE: Re: Fixing Swish 2.4.0 To Work on Windows

On Tue, Nov 11, 2003 at 02:58:52PM +1030, Ahmad, Zeeshan (FMC) wrote:
> >swish.cgi should have the correct path at installation.  What was yours 
> >set to after installation?
> 
> D:\Program Files\SWISH-E4\lib\swish-e\perl

So why would you change it to ./lib/swish-e/perl?


> 
> Zeeshan Ahmad,
> FMC Computing Services
> 
> 
> -----Original Message-----
> From: moseley@hank.org [mailto:moseley@hank.org] 
> Sent: Tuesday, 11 November 2003 2:53 PM
> To: Ahmad, Zeeshan (FMC)
> Cc: Multiple recipients of list
> Subject: Re: [SWISH-E] Re: Fixing Swish 2.4.0 To Work on Windows
> 
> On Mon, Nov 10, 2003 at 07:43:34PM -0800, Ahmad, Zeeshan (FMC) wrote:
> > A couple of things need to be changed when using swish_filter:
> >    swish_filter.pl: 
> >       use lib qw( ./lib/swish-e/perl );
> >    your .config file:	
> >       FileFilter .pdf ./lib/swish-e/swish_filter.pl '"%p" "%P"'
> 
> That all assumes you are running swish-e from the installation 
> directory.
> 
> > 
> > Path issue when using swish.cgi. Correct path to use:
> >       use lib qw( ./perl );
> 
> swish.cgi should have the correct path at installation.  What was yours 
> set to after installation?
> 
> 
> 
> > 
> > Zeeshan Ahmad,
> > FMC Computing Services
> > 
> > 
> > -----Original Message-----
> > From: swish-e@sunsite.berkeley.edu [mailto:swish-e@sunsite.berkeley.edu]
> On
> > Behalf Of David L Norris
> > Sent: Friday, 7 November 2003 6:00 PM
> > To: Multiple recipients of list
> > Subject: [SWISH-E] Re: Fixing Swish 2.4.0 To Work on Windows
> > 
> > On Thu, 2003-11-06 at 23:22, Ahmad, Zeeshan (FMC) wrote:
> > > I was trying to index PDFs with Swish and encountered a bucket load of
> > > problems. It took a lot of tinkering to get it right. In the process,
I
> > made
> > > a few changes (mostly related to paths and directory names with
spaces).
> > If
> > > you can't get file-system based PDF indexing right, try the following
> > > changes. Platform: Win2K
> > 
> > SWISH::Filter is probably a better way to index PDF files and it's the
> > same method used by the spiders.  SWISH::Filter currently provides PDF
> > to HTML, Word Doc to Text, Excel to HTML, and ID3 to HTML.  You can also
> > write your own SWISH::Filter modules and drop them into
> > lib\swish-e\perl\SWISH\Filters.
> > 
> > 
> > You should be able to use this (but see below):
> >   FileFilter .pdf swish_filter.pl '"%p" "%P"'
> > 
> > 
> > I probably should install the example scripts (index_hypermail.pl,
> > _pdf2html.pl, MySQL.pl, file.pl, DirTree.pl) somewhere other than
> > lib\swish-e by default.  I think Bill made that suggestion at some
> > point.  I can see how that would be extremely confusing.
> > 
> > > ------------------------------------
> > > 
> > > Set correct filter path in configuration file. e.g.
> > >    FileFilter .pdf ./lib/swish-e/_pdf2html.pl '"%p"'
> > > 
> > > Set correct path to pdf converters in _pdf2html.pl. e.g.
> > >    $ENV{PATH} ='D:/Program Files/SWISH-E4/lib/swish-e;'. $ENV{PATH};
> > 
> > Yes, that's a good workaround.  I'll see if we can get that fixed in the
> > next release.  We don't seem to be handling FileFilter correctly.  My
> > intention is that everything in {prefix}\lib\swish-e should be directly
> > executable using it's base name.
> > 
> > 
> > Using my above example it does not work without modifying the PATH:
> > C:\SWISH-E>swish-e -c cfg -i n:\temp\test.pdf
> > Indexing Data Source: "File-System"
> > Indexing "n:\temp\test.pdf"
> > 'swish_filter.pl' is not recognized as an internal or external command,
> > operable program or batch file.
> > 
> > 
> > Bill, looks like we never fixed FilterOpen() in filter.c, line 298. 
> > It's not using the new PATH stuff.  It's simply doing a popen().  I
> > think it needs to be doing a get_env_path_with_libexecdir() beforehand.
> > 
> > -- 
> >  David Norris
> >   http://www.webaugur.com/dave/
> >   ICQ - 412039
> > 
> 
> -- 
> Bill Moseley
> moseley@hank.org
> 

-- 
Bill Moseley
moseley@hank.org
Received on Fri Dec 12 05:37:29 2003