> On Thu, Jan 15, 2004 at 05:23:14PM +0100, Marko Faldix wrote:
> > > Did the swish-e installer place those modules there? Last I checked
> > > the modules were installed in <installdir>\lib\swish-e\perl just like
on
> > > Unix.
> >
> >
> > That may be the point. I ADDED this line to the one which was already
there
> > placed by installation routine. So the first lines of my swish.cgi are:
> >
> > #!C:\Perl\bin\perl.exe -w
> > package SwishSearch;
> > use strict;
> >
> > # This is set to where Swish-e's "make install" installed the helper
> > modules.
> > use lib qw( C:\Programme\SWISH-E\lib\swish-e\perl );
> > use lib qw( C:\Programme\SWISH-E\share\doc\swish-e\example\modules );
> >
> > my $DEFAULT_CONFIG_FILE = 'C:\home\mydir\swish\.swishcgi.conf';
> >
> >
> > The first of the above two "use lib" - lines was already provided by the
> > installation routine.
>
> Ok, so look in C:\Programme\SWISH-E\lib\swish-e\perl and see if the
> modules are installed there. If not then there's something broken in the
> Windows installer, but it's seems unlikely since the path used to
> install the modules is the same one used to update swish.cgi at install
> time.
>
> > That's a goed question, I am going to believe there is no working
directory
> > for Perl script, or is it where Perl.exe is? I am not so familiar with
Perl,
> > send me a cgi script for perl which prints cwd on browser so I could
tell
> > what IIS here does If you want to.
>
> Well, I would hope that there's *some* concept of current directory (I'm
> sure there is), so it's a matter of finding out how IIS deals with CGI
> scripts. [Isn't setting the current working directory part of the CGI
> "standard"??]
>
> You should be able to do something like this near the top of swish.cgi
> to find out:
>
> use Cwd;
> print STDERR "swish.cgi thinks the cwd is set to " . getcwd() . "\n";
I used this and here's result for IIS.
Remember script was called with http://localhost/swish/swish.cgi
and is actually c:\home\mydir\swish\swish.cgi
But on IIS getcwd returns c:\home\mydir
which is Path to website root http://localhost
Then I did a further test:
my $DEFAULT_CONFIG_FILE = '.swishcgi.conf';
does not find my settings, but then I copied for testing reason
.swishcgi.conf to directory c:\home\mydir and my settings are found.
I could suggest the following:
On both, Apache and IIS (don't know for PWS or other) there is server
variable called PATH_TRANSLATED set as full file system path to called cgi
script, thus in my case it is set
PATH_TRANSLATED = c:\home\mydir\swish\swish.cgi
when calling http://localhost/swish/swish.cgi
If you cut away script name "swish.cgi" at the end you could concatenate (in
my case) 'c:\home\mydir\swish\' with '.swishcgi.conf' and this configuration
was found on Apache and IIS in same directory as swish.cgi is.
Marko Faldix
Received on Fri Jan 16 10:07:09 2004