I have problems in installing apache2::Request. What I did on my RHEL 4 machine are
2) Download mod_perl-2.0.3 source from http://perl.apache.org/dist/mod_perl-2.0.3.tar.gz
3) Remove the old mod_perl rpm's:
suppressed rpm -ev mod_perl-devel-1.99_16-4
suppressed rpm -ev mod_perl-1.99_16-4
4) Build mod_perl-2.0.3 according to mod_perl-2.0.3/INSTALL
5) Install Apache2::Request module using CPAN without running test.
But, when I try perl -MApache2::Request -e 'print "installed!\n"' , I get bad result:
suppressed perl -MApache2::Request -e 'print
"installed!\n"'
Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/APR/APR.so' for
module APR: libaprutil-1.so.0: cannot open shared object file: No such file or
directory at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Pool.pm line 23
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Pool.pm line 23.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Pool.pm line 23.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request.pm line 26.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request.pm line 26.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request/Param.pm line 27.
BEGIN
failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request/Param.pm line 27.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Apache2/Request.pm line 2.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Apache2/Request.pm line 2.
Compilation failed in require.
BEGIN failed--compilation aborted.
Then I installed libapreq2-2.08. But the problem is still there because when I run below sample code by Philip, the error_log says uninitialized value of $p.
Code sample by Philip M. Gollucci:
package TEST::APREQ;
use strict;
use warnings FATAL => 'all';
use Apache2::RequestRec ();
use Apache2::RequestIO ();
use Apache2::Const -compile => qw(OK);
use APR::Request::Apache2 ();
sub handler {
my $r = shift;
my $req =
APR::Request::Apache2->handle($r);
my $p = $req->args('p');
$r->content_type('text/plain');
$r->print("p: $p");
return Apache2::Const::OK;
}
1;
I tried different ways without luck. Could you please help me on this? What is the best way to test if Apache2::Request installation works or not?
Thank you very much.
Jeff
P.S. This is my first post to the list. I hope I do not post it twice.