I have a Perl script installed on my XP Pro Sp2 machine with ActivePerl 5.8.3 build 809, that uses Net::SSLeay version 1.25 to download https URLs, and works fine. I also have the Web server OpenSA 2.0.2 which runs some CGI scripts that use Net::SSLeay to fetch content from third-party https sites and those work too.

However, a friend of mine has installed the same script on his machine where he has the exact same version of Perl, the exact same version of OpenSA, and the exact same version of Net::SSLeay installed, and is seeing this odd behavior:

1) If he has this script:
>>>
#!c:/perl/bin/perl.exe

eval { require Net::SSLeay } ;
if ($@)
{
        print "Yes: [EMAIL PROTECTED]";
}
else
{
        print "No.\n";
}
>>>
in a file named nph-test.cgi and runs it from the command line with the command "perl nph-test.cgi", it outputs "No." (That is, the "require Net::SSLeay" statement runs with no problem.)

2) BUT, if he loads the same script in a Web browser from the cgi-bin directory of OpenSA, it outputs:
>>>
Yes: Can't load 'C:/Perl/site/lib/auto/Net/SSLeay/SSLeay.dll' for
module Net::SSLeay: load_file:The specified module could not be found
at C:/Perl/lib/DynaLoader.pm line 229.
 at C:/OpenSA/Apache2/cgi-bin/nph-test.cgi line 3
Compilation failed in require at C:/OpenSA/Apache2/cgi-bin/nph-test.cgi line 3.
>>>
(Note, the file C:/Perl/site/lib/auto/Net/SSLeay/SSLeay.dll *does* exist on his machine.)

3) On my machine the script works fine (i.e. outputs "No", indicating no error loading Net::SSLeay) when run from the command line OR loaded via the Web server.

Any idea why this error would happen only when the script is run through the Web server, and why it would happen only on one machine but not another?

The relevant line of DynaLoader.pm says:
>>>
    # Many dynamic extension loading problems will appear to come from
    # this section of code: XYZ failed at line 123 of DynaLoader.pm.
    # Often these errors are actually occurring in the initialisation
    # C code of the extension XS file. Perl reports the error as being
    # in this perl code simply because this was the last perl code
    # it executed.

    my $libref = dl_load_file($file, $module->dl_load_flags) or
        croak("Can't load '$file' for module $module: ".dl_error());
>>>

I'm not sure what that means though. What would "the extension XS file" be in this case? There are no *.xs files in C:\Perl\site\lib\auto\Net\SSLeay.

        -Bennett

[EMAIL PROTECTED]     http://www.peacefire.org
(425) 497 9002

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to