S
Subodh
I'm trying to make a HTTP request to a Web server.
The Perl module is executed in mod_perl on Apache 1.3
The code :
----------------
my $r = shift;
my $browser = LWP::UserAgent->new( );
$url = 'http://10.3.8.137/';
my $response = $browser->get($url);
my $response_line = $response->status_line();
$r->log_error("response line '" . $response_line."'");
my $isSuccess = $response->is_success();
my $content_type = $response->content_type();
$r->log_error("Content type '" . $content_type ."'");
my $content = $response->content( );
----------------
The problem is , both response_line() and content() methods above give
following output :
---
"500 Can't locate loadable object for module
HTML:arser in @INC (@INC contains:
/opt/ora9/product/9.2/Apache/perl/lib/5.00503/i686-linux
/opt/ora9/product/9.2/Apache/perl/lib/5.00503
/opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005/i686-linux
/opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/5.00503/i686-linux
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/5.00503
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/site_perl/5.005/i686-linux
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/site_perl/5.005
.. /opt/ora9/product/9.2/Apache/Apache/
/opt/ora9/product/9.2/Apache/Apache/lib/perl
/opt/ora9/product/9.2/Apache/perl/lib/5.00503
/opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005)
------
On the other hand, the is_success() method returns an empty string and
content_type() method returns 'text/plain' (which is incorrect, since
the content is HTML )
I've checked that, the HTML/Parser.pm is correctly present in the @INC
path and permissions etc are correct.
Can anyone point out, how to solve this ?
Thanks,
S
The Perl module is executed in mod_perl on Apache 1.3
The code :
----------------
my $r = shift;
my $browser = LWP::UserAgent->new( );
$url = 'http://10.3.8.137/';
my $response = $browser->get($url);
my $response_line = $response->status_line();
$r->log_error("response line '" . $response_line."'");
my $isSuccess = $response->is_success();
my $content_type = $response->content_type();
$r->log_error("Content type '" . $content_type ."'");
my $content = $response->content( );
----------------
The problem is , both response_line() and content() methods above give
following output :
---
"500 Can't locate loadable object for module
HTML:arser in @INC (@INC contains:
/opt/ora9/product/9.2/Apache/perl/lib/5.00503/i686-linux
/opt/ora9/product/9.2/Apache/perl/lib/5.00503
/opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005/i686-linux
/opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/5.00503/i686-linux
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/5.00503
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/site_perl/5.005/i686-linux
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/site_perl/5.005
.. /opt/ora9/product/9.2/Apache/Apache/
/opt/ora9/product/9.2/Apache/Apache/lib/perl
/opt/ora9/product/9.2/Apache/perl/lib/5.00503
/opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005)
------
On the other hand, the is_success() method returns an empty string and
content_type() method returns 'text/plain' (which is incorrect, since
the content is HTML )
I've checked that, the HTML/Parser.pm is correctly present in the @INC
path and permissions etc are correct.
Can anyone point out, how to solve this ?
Thanks,
S