httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject Re: Loading Apache2::Request under CGI on Win32
Date Tue, 16 Aug 2005 03:47:04 GMT
On Mon, 15 Aug 2005, Nikolay Ananiev wrote:

[ ... ]
> The problem appears when  libapreq2.dll and mod_apreq2.so are not in
> $ENV{PATH}.
> When eval{require Apache2::Request} is executed, on the desktop appears a
> message saying that libapreq2.dll could not be found in the path.
> This would hold the perl process until the administrator hits OK.
> Is there any way to prevent this message from showing up?
> Or maybe there should be a warning while installing apreq2 
> that in order to use Apache2::Request under CGI, 
> libapreq2.dll and mod_apreq2.so must be in the PATH?

For the libapreq2 ppm package in our repository:
   http://theoryx5.uwinnipeg.ca/ppms/
I've added a message along these lines to the post-install 
script that fetches and installs libapreq2.dll and 
mod_apreq2.so (technically, in order to use these under 
Apache, you don't need to put either in the PATH, as they
can be included via directives in httpd.conf).

> I know I can just add the missing paths to the 
> environment, but I'm going to sell my application and I'd 
> like to prevent the problems that may appear on my 
> clients' servers.

If you have control over where the users install libapreq2, 
you could have libapreq2.dll installed into some location in 
the system PATH (eg, $ENV{SystemRoot}), and then try 
APR::Request (which doesn't require mod_apreq2.so). 
Permissions and/or system policy may prevent this option,
however.

If you have control over the installation of mod_perl,
you might consider editing Apache2::BuildConfig to
reflect the location of the installed Apache2 binary
(I thought about doing this for the mod_perl ppm
package in our repository, but decided not to, in
case something went wrong). What might be safer is to
use something like the code in install_libapreq2 in
    http://theoryx5.uwinnipeg.ca/ppms/scripts/
to guess at the location of the installed Apache2; I
think this handles most of the common installation
locations.

Alternatively, if you know the installation of Apache 
involves adding any Registry settings, you could get
at that information there.

Another approach is just to look for a *file*, for example, 
Apache2/Request.pm, in @INC, and if it's there, assume 
Apache2::Request is available. This of course has the 
disadvantage that it doesn't check if it's a working 
installation.

-- 
best regards,
randy

Mime
View raw message