perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Prime <>
Subject Re: Problem getting started
Date Sat, 12 Jul 2008 12:58:27 GMT
John M. Dlugosz wrote:
> I'm trying to use mod_perl on Debian Etch.  I was looking at "practical mod_perl" book,
but it appears that much has changed in mod_perl 2.0 so the second example doesn't work at
> The first example, which is just two print statements to give a minimal header and content
text, is invoked so I know the code is installed and the Apache configuration files are set
> But the code from the Synopses of the Apache2::Request module documentation causes a
segfault on the second line.  The 'use' is OK, but the 'new' shows in the apache logs that
there was a segfault.
> How do I begin to find out what the real error is?  Is there something more that needs
to be done with Debian installing from the apt?  Could someone post a trivial example that
ought to work?
> --John

It looks like the examples from practical mod_perl are from before the 
API was changed to use Apache2:: instead of Apache::.  So for all those 
examples you'd need to s/Apache::/Apache2::/g.  If you could provide a 
link to the specific example you're having trouble with that might help. 
   The whole book is online at if you weren't 
already aware.

For the Apache2::Request problem you're running:

     use Apache2::Request;
     $req = Apache2::Request->new($r);
     @foo = $req->param("foo");
     $bar = $req->args("bar");

and getting a segfault on new?

Are you running this as a handler, or through one of the CGI emulation 
layers (ModPerl::PerlRun, or ModPerl::Registry for example).  you do 
also have

my $r = shift;

somewhere above that (and ideally use strict; as well) right?

I personally normally install mp and libapreq from source, so i'm not 
familiar with how one would install/configure them using debian.


View raw message