I had to install openssl before this would work. Do a search for "openssl" (a free windows download).
Sam Gardner
GTO Application Development
Keefe, Bruyette & Woods, Inc.
212-887-6753
-----Original Message-----
From: Lundgren, Scott [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 10, 2005 10:30 AM
To: [email protected]
Subject: Crypt::SSLeay
I'm using a script that uses Crypt::SSLeay and the module doesn't seem to have installed properly so I'm hoping someone can guide me of how to correct it. Below is my environment, how I installed Crypt::SSLeay, the script that doesn't work, and what I've tried to figure out why the script doesn't work. Please suggest you think I should try next.
- SL
The OS is Windows Server 2003 Standard Edition, the web server is IIS 6.0, and the installation of Perl is ActivePerl 5.8.4.810. To install Crypt::SSLeay I followed the HOWTO @ http://johnbokma.com/perl/https.html and installed the module via the PPM command:
ppm> install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd
When prompted, I chose to fetch both the ssleay32.dll and libeay32.dll and both were put in C:\Perl\bin. When I request the script below via IIS from a browser, the script does not send output to the browser but there's this entry in C:\Perl\bin\PerlIS-Err.log:
*** 'D:\websites\internalserver.uncc.edu\www\https-test.cgi' error message at: 2005/01/10 09:46:07 Failed to GET 'https://www.helsinki.fi/': 501 Protocol scheme 'https' is not supported (Crypt::SSLeay not installed) at D:\websites\internalserver.uncc.edu\www\https-test.cgi line 14.
#!/usr/bin/perl
# https-test.cgi - HTTPS GET example
#
# (c) 2004 By John Bokma, http://johnbokma.com/
use strict;
use warnings;
use LWP::UserAgent;
my $url = '';" TARGET="_blank">https://www.helsinki.fi/';
my $ua = LWP::UserAgent->new;
my $response = $ua->get( $url );
$response->is_success
or die "Failed to GET '$url': ", $response->status_line;
print $response->as_string
As the above script works fine when I log into the server and run it from command line, I copied the script below to specifically load the Crypt::SSLeay module and then dump out what modules & other environment settings were being used.
#!/usr/bin/perl
# path-test.cgi
use strict;
use Crypt::SSLeay;
# to find the path to Perl binary
print "Perl Binary: \n$^X\n";
# library path
print "Perl [EMAIL PROTECTED]: \n", join "\n", @INC;
# and to find the path to the script you are executing:
use FindBin qw($RealScript $RealDir);
print "\nPerl Script Executing: \n$::RealDir/$::RealScript\n"; # sucessfully loaded modules print "\nPerl Modules Loaded: \n", map {"$_ => $INC{$_}\n"} keys %INC; # path print "\nPerl Path: \n", $ENV{PATH};
Which produces this output from commandline:
D:\websites\internalserver.uncc.edu\www>perl path-test.cgi
Perl Binary:
C:\Perl\bin\perl.exe
Perl @INC:
C:/Perl/lib
C:/Perl/site/lib
.
Perl Script Executing: D:/websites/internalserver.uncc.edu/www/path-test.cgi
Perl Modules Loaded:
re.pm => C:/Perl/lib/re.pm
XSLoader.pm => C:/Perl/lib/XSLoader.pm
warnings/register.pm => C:/Perl/lib/warnings/register.pm
Cwd.pm => C:/Perl/lib/Cwd.pm
warnings.pm => C:/Perl/lib/warnings.pm
File/Basename.pm => C:/Perl/lib/File/Basename.pm
Config.pm => C:/Perl/lib/Config.pm
Crypt/SSLeay.pm => C:/Perl/site/lib/Crypt/SSLeay.pm Crypt/SSLeay/X509.pm => C:/Perl/site/lib/Crypt/SSLeay/X509.pm
Carp.pm => C:/Perl/lib/Carp.pm
Exporter/Heavy.pm => C:/Perl/lib/Exporter/Heavy.pm File/Spec/Unix.pm => C:/Perl/lib/File/Spec/Unix.pm strict.pm => C:/Perl/lib/strict.pm vars.pm => C:/Perl/lib/vars.pm Exporter.pm => C:/Perl/lib/Exporter.pm File/Spec.pm => C:/Perl/lib/File/Spec.pm AutoLoader.pm => C:/Perl/lib/AutoLoader.pm File/Spec/Win32.pm => C:/Perl/lib/File/Spec/Win32.pm DynaLoader.pm => C:/Perl/lib/DynaLoader.pm FindBin.pm => C:/Perl/lib/FindBin.pm
Perl Path:
C:\Perl\bin\;C:\Program Files\VERITAS\NetBackup\bin\;C:\WINDOWS\system32;C:\WIND
OWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft Visual C++ Toolkit 2003\ bin;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin;C:\Program Files\ Microsoft SDK\bin;C:\Program Files\Microsoft SDK\bin\winnt;C:\Perl\bin\;C:\Progr
am Files\VERITAS\NetBackup\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\S
ystem
32\Wbem
D:\websites\internalserver.uncc.edu\www>
But produces this this entry in C:\Perl\bin\PerlIS-Err.log when path-test.cgi is requested via browser:
*** 'D:\websites\internalserver.uncc.edu\www\path-test.cgi' error message at: 2005/01/10 10:14:44 Can't load 'C:/Perl/site/lib/auto/Crypt/SSLeay/SSLeay.dll' for module
Crypt::SSLeay: load_file:Access is denied at C:/Perl/lib/DynaLoader.pm line 230. at D:\websites\internalserver.uncc.edu\www\path-test.cgi line 5 Compilation failed in require at D:\websites\internalserver.uncc.edu\www\path-test.cgi line 5. BEGIN failed--compilation aborted at D:\websites\internalserver.uncc.edu\www\path-test.cgi line 5.
_______________________________________________
Perl-Win32-Users mailing list [email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
