Skip to main content.
home | support | download

Back to List Archive

Re: swish-e 2.4.3 windows 2003 iis success!

From: David L Norris <dave(at)not-real.webaugur.com>
Date: Wed Jun 22 2005 - 00:28:40 GMT
On Tue, 2005-06-21 at 17:07 -0400, Revillini, James wrote:
> 1. did not accept a network path to index
> Index config file contained only the IndexDir directive
> Tried: \\fileservername\folder
> Error: Warning: Invalid path '//fileservername/folder': No such file or directory
> Tried: \\fileservername\folder\
> Error: Warning: Invalid path '//fileservername/folder': No such file or directory

UNC and volume paths are broken exactly backward from each other in
Windows.  We always seem to miss one case of brokenness when we add
hacks to work around some API bug.  Microsoft's "solution" (since they
don't correct API bugs) is to always append "\." when using stat on a
directory.  I'll see if I can go over that one more time and make sure
it all works right.

The Windows stat bug works something like this:
  c:\ is a folder.
  c:\test\ does not exist.
  c:\test is a folder.
  \\server does not exist.
  \\server\ does not exist.
  \\server\. is a folder.
  \\server\test does not exist.
  \\server\test\ is a folder.

One access method requires a trailing slash and the other cannot have
one.  The root of a mounted volume works backward from all other
folders.  The root of a UNC path always returns a "file doesn't exist"
error.



> 2. could not have backslashes in the IndexDir argument. 

I don't fully understand that one.  Backslashes should be converted to /
unless they are a command line parameter.  "C:\something" should be
escaped into C:\\something.



> 3. 404 errors - assume you have a windows 2003 box without activeperl installed.  Assume you go and install it (to e:\perl\), then you install swish-e (to e:\swish-e\).  Assume you copy swish.cgi, index.swish-e and index.swish-e.prop from e:\swish-e\ to your search directory (I use e:\search\).  Do all the testing and all that (issues with testing will be brought up later).  Assume everything works.  Great.  Now you're ready to try the real browser test.  (Assume you've created a website in IIS called "search" which uses port 85)

OK, so the .cgi extension isn't handled by perl by default.  Seems like
I recall that IIS has (or had?) its own built-in cgi handler.



> 4. Assume you leave off at the end of the issue noted above.
>         swish_binary    => 'swish-e.exe',  # Location of swish-e binary

Hrm, that value is set from the registry by fixperl.pl.  Maybe there was
a bug in the release installation script.  The value is in the
HKLM\SOFTWARE\SWISH-E Team\SWISH-E\2.4.3 key under the swishbinary
string value.  If you can let me know what registry values are under
that key on your test system.

> TRIED: copying swish-e.exe into the e:\search\ folder.

Yeah, definitely something you don't want to do.  swish-e.exe expects
the installation folder to be relative to it's own location.  (Either .
or .. if it is in a bin subdirectory.)

> TRIED: changing the swish_binary path to the full path, thus:
>         swish_binary    => 'e:\swish-e\swish-e.exe',  # Location of swish-e binary
> RESULT: it worked
> 
> I finally figured that one out because when I issued the command swish-e -V at the e:\search> prompt, it told me the xmlparse.dll was missing, and I started putting things together.  I wonder if swish-e should go into the path environment variable on windows machines.  I don' know yet if that would work so that the default swish.cgi worked out of box.

Yes, that's a simple PATH problem since swish-e.exe is linked to a bunch
of DLLs you didn't copy.  However, the next version will have to install
the DLLs into the system32 directory despite the insanity that will
probably cause.



> 5. links to files don't work.  This is why I ended up using the line
> ReplaceRules replace "z:/" "file://fileservername/folder/"
> The search works fine, and internet explorer can follow the links - firefox 1.0.3 cannot.  I still can't figure out the firefox bug.  I can tell you that in firefox, the link show in the status bar is:

That URI should be something more like (tested and works on XP with both
IE and Firefox):
  file://///fileservername/folder/



> 6. m$ word docs aren't indexing properly.  Unfortunately, I just noticed this and have not researched it at all.  I just ran the index again on a subdirectory and noticed that all word docs are showing that only 1 word gets indexed.  Here's the config file:
> In dir "z:/subdirectory/subsub":
>   Word doc 1.doc - Using DEFAULT (HTML2) parser -  (1 words)
>   Word doc 2.doc - Using DEFAULT (HTML2) parser -  (1 words)

Just need to setup a FileFilter directive that uses catdoc, wvware, a
SWISH::Filter script or some other word converter.

-- 
 David Norris
  http://www.webaugur.com/dave/
  ICQ - 412039
Received on Tue Jun 21 17:28:43 2005