On Tue, 16 Aug 2005, Nikolay Ananiev wrote:

"Randy Kobes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On Mon, 15 Aug 2005, Nikolay Ananiev wrote:

Hello,
I'd like my application to do the following:

if(eval{require Apache2::Request}) {
use_apreq();
} else {
use_cgi_pm();
}

This works with mod_perl on Win32, but has problems under CGI (again on
Win32).

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?

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.

I've seen this problem too - what you might try is
testing for the presence of APR::Request instead.

This won't help me prevent the problem.

I missed that you were also missing libapreq2.dll in the PATH - sorry about that. Testing for APR::Request only needs libapreq2.dll (not mod_apreq2.so) in the PATH (and potentially also the Apache apr dlls, which typically are in the same directory as libapreq2.dll).

BTW, is there an equivalent of GNU ld's -rpath option for the win32 linker? If there is, it will be easy to fix this problem.

I'm not aware of one.

--
best regards,
randy

Reply via email to