Re: Problems with Apache::Request
[prev]
[thread]
[next]
[Date index for 2005/04/29]
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.=
=20
of course, if you can't you can't.
HTH
Angie
On 4/29/05, Stephen Quinney <stephen@xxxxxxxx.xxx.xx> 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.
>=20
> This is with libapreq2-2.04_03-dev and mod_perl2 1.999.21-1 but I've
> had similar problems with earlier versions.
>=20
> I have a very simple mod_perl handler:
>=20
> package Jadevine::Hello;
>=20
> use Apache2;
> use Apache::RequestRec ();
> use Apache::RequestIO ();
> use Apache::Request ();
> use Apache::Const -compile =3D> qw(OK);
>=20
> sub handler {
> my $r =3D shift;
> $r->content_type('text/plain');
> print "mod_perl 2.0 rocks!\n";
> return Apache::OK;
> }
> 1;
>=20
> This is loaded in the Apache config with:
>=20
> <Location /Hello>
> SetHandler perl-script
> PerlResponseHandler Jadevine::Hello
> </Location>
>=20
> 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:
>=20
> [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
>=20
> 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.
>=20
> I can see where the error comes from in the Apache::Request code:
>=20
> my $env =3D __PACKAGE__->env || '';
> if ($mod_perl::VERSION > 1.99) {
> die __PACKAGE__ . ": httpd must load mod_apreq.so first"
> if $env ne "Apache::RequestRec";
> }
>=20
> For the record $env contains 'APR::Pool', not sure if this is what
> should be there or not.
>=20
> Any help would be much appreciated, thanks in advance,
>=20
> Stephen Quinney
>=20
>=20
>
 |
 |
Re: Problems with Apache::Request
angie ahl 18:59 on 29 Apr 2005
|