On Mon, Aug 30, 2004 at 12:38:35PM +0930, Ahmad, Zeeshan (FMC) wrote:
> 1. When using API/use_library mode, swish.cgi can not read the swish_index
> property when it is defined as an array. So
>
> swish_index => ['e:\Progra~1\swish-e\lib\swish-e\fmcmaster.index'],
>
> generates this error
>
> Index file error: Could not open the index file 'ARRAY(0x17849a4)': No such
> file or directory
Yes, thanks. Not too much trouble to fix:
Index: swish.cgi.in
===================================================================
RCS file: /cvsroot/swishe/swish-e/example/swish.cgi.in,v
retrieving revision 1.17
diff -u -B -r1.17 swish.cgi.in
--- swish.cgi.in 28 Jun 2004 02:10:02 -0000 1.17
+++ swish.cgi.in 30 Aug 2004 13:14:54 -0000
@@ -1966,7 +1966,7 @@
SwishSearch::load_module( 'SWISH::API' );
- my $indexes = join ' ', $self->swish_command('-f');
+ my $indexes = $self->swish_command('-f');
print STDERR "swish.cgi: running library thus no 'output' available -- try 'summary'\n"
@@ -1979,7 +1979,7 @@
unless ( $cached_handles{$indexes} ) {
- my $swish = SWISH::API->new( $indexes );
+ my $swish = SWISH::API->new( ref $indexes ? join(' ', @$indexes) : $indexes );
if ( $swish->Error ) {
$self->errstr( join ': ', $swish->ErrorString, $swish->LastErrorMsg );
delete $cached_handles{$indexes} if $swish->CriticalError;
> 2. On the other hand when I don't use API/use_library, search doesn't work
> at all. Crashes with this error message:
> *** 'E:\Program Files\SWISH-E\share\doc\swish-e\example\swish.plx' error
> message at: 2004/08/30 12:27:16
> E:\Program Files\SWISH-E\share\doc\swish-e\example\swish.plx open2: Can't
> call method "close" on an undefined value at E:/Program
> Files/Perl/lib/IPC/Open3.pm line 341.
I can't help you there. When I use open2 on my (non-windows) machine
it doesn't generate that error. That's probably something you would need
to debug -- you have the line number and file name where the error is
being reported so you could work back from there.
I still don't know the best way to run a separate process under
Windows. IPC::Open3 is suppose to avoid the shell, but I also note in
the "run_windows()" in swish.cgi function that I place all parameters
in double quotes -- which makes me think there is a shell involved.
Doesn't make much sense. I keep thinking that with all the Windows
users of swish that someone would come along and explain how best to
do this. I've been asking for quite a few years now.
--
Bill Moseley
moseley@hank.org
Received on Mon Aug 30 06:50:53 2004