I'd get upgraded to MP2 1999.22 if I were you. Stas told me I should as things changed between your version and it, this whole use Apache2 thing has gone:
http://perl.apache.org/docs/2.0/rename.html I figured I'd have to do it eventually and things are now running smoother. of course, if you can't you can't. HTH Angie On 4/29/05, Stephen Quinney <[EMAIL PROTECTED]> wrote: > I've been having problems with the Apache::Request module (from > libapreq2) and mod_perl2 for a while now and I've not come up with a > decent solution. I am using the Debian packages but I didn't get a > response from the maintainer so I hope someone here can enlighten me. > > This is with libapreq2-2.04_03-dev and mod_perl2 1.999.21-1 but I've > had similar problems with earlier versions. > > I have a very simple mod_perl handler: > > package Jadevine::Hello; > > use Apache2; > use Apache::RequestRec (); > use Apache::RequestIO (); > use Apache::Request (); > use Apache::Const -compile => qw(OK); > > sub handler { > my $r = shift; > $r->content_type('text/plain'); > print "mod_perl 2.0 rocks!\n"; > return Apache::OK; > } > 1; > > This is loaded in the Apache config with: > > <Location /Hello> > SetHandler perl-script > PerlResponseHandler Jadevine::Hello > </Location> > > If I remove the "use Apache::Request" line everything works > fine. Leaving it there, or actually trying to use the methods provided > by the module give the error: > > [error] [client 127.0.0.1] failed to resolve handler `Jadevine::Hello': > Apache::Request: httpd must load mod_apreq.so first at > /usr/lib/perl5/Apache2/Apache/Request.pm line 31.\nCompilation failed in > require at /usr/local/lib/site_perl/Jadevine/Hello.pm line 5.\nBEGIN > failed--compilation aborted at /usr/local/lib/site_perl/Jadevine/Hello.pm > line 5.\nCompilation failed in require at (eval 3) line 3.\n > > I have tried putting the "use" statements in every order imaginable > without any joy so I'm not sure what the error is trying to get me to > do to correct the problem. > > I can see where the error comes from in the Apache::Request code: > > my $env = __PACKAGE__->env || ''; > if ($mod_perl::VERSION > 1.99) { > die __PACKAGE__ . ": httpd must load mod_apreq.so first" > if $env ne "Apache::RequestRec"; > } > > For the record $env contains 'APR::Pool', not sure if this is what > should be there or not. > > Any help would be much appreciated, thanks in advance, > > Stephen Quinney > > >