VincentC
06-09-2009, 10:28 AM
I created a very simple program:
#!C:/Perl/bin/perl.exe
use LWP::UserAgent;
my $url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
my $ua = LWP::UserAgent->new;
my $res = $ua->get( $url );
my $req = HTTP::Request->new(GET => $url);
my $res = $ua->request($req);
print "Content-type: text/html\r\n\r\n";
print $res->content;
exit (0);
It works from the command line. It does not work when called from a browser.
OS:Windows XP,
Located in C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin.
cgi-bin was verified working with simple HelloWorld.pl program.
Browser Output:
500 Can't locate object method "new" via package "Net::SSL"
It is as if when executed in cgi-bin, it forgets where all the perl modules are.
Please Help. Thanks.
#!C:/Perl/bin/perl.exe
use LWP::UserAgent;
my $url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
my $ua = LWP::UserAgent->new;
my $res = $ua->get( $url );
my $req = HTTP::Request->new(GET => $url);
my $res = $ua->request($req);
print "Content-type: text/html\r\n\r\n";
print $res->content;
exit (0);
It works from the command line. It does not work when called from a browser.
OS:Windows XP,
Located in C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin.
cgi-bin was verified working with simple HelloWorld.pl program.
Browser Output:
500 Can't locate object method "new" via package "Net::SSL"
It is as if when executed in cgi-bin, it forgets where all the perl modules are.
Please Help. Thanks.