www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Pelton <...@pkc.com>
Subject os-windows/2555: ISAPI: DLLs used by an ISA are not found in the ISA's directory
Date Mon, 06 Jul 1998 16:00:50 GMT

>Number:         2555
>Category:       os-windows
>Synopsis:       ISAPI: DLLs used by an ISA are not found in the ISA's directory
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Jul  6 09:10:01 PDT 1998
>Originator:     jsp@pkc.com
>Release:        1.3b5
Windows NT Workstation 4.0 SP3
MSVC 5.0
If an ISA uses a DLL that's installed in the same directory as the ISA,
isapi_handler()'s LoadLibraryEx() call fails.  Windows pops up a dialog naming
the required DLL and listing the path it searched, which does *not* include the
directory that the ISA is located in.  LoadLibraryEx() is apparently able to
locate the ISA, but not to add its path to its search list.

Running Apache under a debugger reveals that the filename passed to
LoadLibraryEx() uses forward slashes for directory separators. Changing these
to back slashes remedies the problem.

I'm running Apache as a service.  For some reason, this problem does not occur
if Apache is running as an app.
Create an ISA that uses an import library to make calls into a DLL.  (This
causes the OS to load the required DLL when the ISA is loaded.)  Install
the ISA and its DLL in one directory (*not* system32 or any directory in the
system's search path).  Then invoke the ISA.
My tested, minimal fix: make a local copy of the filename, change its forward
slashes to back slashes, and pass it to LoadLibraryEx().  A more robust
approach might be to perform this replacement on r->filename any time it's set.
I get the impression that revising sub_canonical_filename() might do the trick,
but I'm not familiar enough with the code to be sure, and it's possible that
this would introduce new problems.
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]

View raw message