Re: Problem getting started
John M. Dlugosz wrote:[color=blue]
> 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 all.
> 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 up.
> 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?
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 [url]http://modperlbook.org/[/url] if you weren't
For the Apache2::Request problem you're running:
$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
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.
Re: Problem getting started
Unfortunately, I'm still muddy with modperl to help you even though I'm
on Debian Etch. I have it working and can tell you what I have
installed...but I can't help you with modperl specifics as I'll probably
end up teaching the wrong thing.
To answer Adam's question:
Adam Prime wrote:[color=blue]
> John M. Dlugosz wrote:[color=green]
>> 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 all.
> I personally normally install mp and libapreq from source, so i'm not
> familiar with how one would install/configure them using debian.[/color]
aptitude install libapreq2
as root (or sudo). Or just install everything related if you are not sure:
aptitude install libapache2-mod-apreq2 libapreq2 libapreq2-dev libapreq2-doc
(I have all of them installed.)
Of course, apt-get works too, if you prefer that. I don't remember
doing more configuration. There's a symlink from
Sorry, can't think of anything else tricky that I did. I hope this is