Re: Ubuntu and mod_perl

2011-05-17 Thread Jeff Trawick
On Tue, May 17, 2011 at 8:25 PM, silent  wrote:
> you have compiled and installed one apache, and you made it start at boot 
> time,
> you must disable it or remove it ( do not let it start at boot time )
>
> 2011/5/18 Tom Kane :
>> I tried to incorporate suggestions I've received. After restarting apache2, 
>> this is what happened:
>>
>>
>> tomkane@sfq:~$ /etc/init.d/apache2 start
>>  * Starting web server apache2
>> [Tue May 17 20:12:34 2011] [warn] module perl_module is already loaded, 
>> skipping
>> (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80

sudo /etc/init.d/apache2 start

(or restart if already running)


Re: Ubuntu and mod_perl

2011-05-17 Thread silent
you have compiled and installed one apache, and you made it start at boot time,
you must disable it or remove it ( do not let it start at boot time )

2011/5/18 Tom Kane :
> I tried to incorporate suggestions I've received. After restarting apache2, 
> this is what happened:
>
>
> tomkane@sfq:~$ /etc/init.d/apache2 start
>  * Starting web server apache2
> [Tue May 17 20:12:34 2011] [warn] module perl_module is already loaded, 
> skipping
> (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
> no listening sockets available, shutting down
> Unable to open logs
>                                                     [fail
>
>
> Now apache2 won't even start. It's not as if my network address is gone 
> because I see it's still there at boot time. I'm going a little daft now. 
> It's not as if I haven't seen a message like this before, but I've forgotten 
> what to do about it. Any suggestions?
>
> Once again, I want to thank everyone for their suggestions.
>
> Tom
>


Ubuntu and mod_perl

2011-05-17 Thread Tom Kane
I tried to incorporate suggestions I've received. After restarting apache2, 
this is what happened:


tomkane@sfq:~$ /etc/init.d/apache2 start
 * Starting web server apache2
[Tue May 17 20:12:34 2011] [warn] module perl_module is already loaded, skipping
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
 [fail


Now apache2 won't even start. It's not as if my network address is gone because 
I see it's still there at boot time. I'm going a little daft now. It's not as 
if I haven't seen a message like this before, but I've forgotten what to do 
about it. Any suggestions?

Once again, I want to thank everyone for their suggestions.

Tom


Re: Ubuntu and mod_perl

2011-05-17 Thread André Warnier

Fred Moyer wrote:

On Tue, May 17, 2011 at 3:22 PM, Tom Kane  wrote:

Now, I have another issue: I have created a startup.pl file and placed it into 
the conf.d
 directory. However, when I restart apache2 I get an error message to the 
effect that the first
'use' statement is a syntax error. I'm sure that my problem lies in my 
confusion as to (1) where
to point ServerRoot, and (2) where I'm supposed to put my perl scripts. These 
are all pretty
elementary, I suppose, but if anyone can shed any light, I will be very 
appreciative.


You should have a line in your httpd.conf that looks something like
this.  If not, you will need to add it.

PerlPostConfigRequire /etc/apache2/conf.d/startup.pl



I think that's a bit confused (and confusing).

Under Ubuntu/Debian, the directory /etc/apache2/conf.d is meant to contain bits of 
configuration which *apache* reads and interprets.  So whatever is in there, should not be 
perl scripts. It should be Apache directives, like inside httpd.conf.


(And that is also why you get (from Apache) that error about "use" being an invalid 
directive.  It is, for Apache, which does not understand perl.)


Place your perl startup.pl script somewhere else (for example directly in /etc/apache2), 
and then, in /etc/apache2/conf.d, create a file with the single text line :


PerlPostConfigRequire /etc/apache2/startup.pl

---

Now, let's mentally reboot and think about the future :

Later, you are (also) going to need a place to put your own mod_perl modules (the ones you 
are going to create).
So I suggest to create a directory for that, for example : /usr/local/lib/modperl, and 
make it readable and "executable" by the user under wich Apache runs (www-data ?).


Then, place your startup.pl script there.

Then, in /etc/apache2/conf.d, place a file (or modify the above file) with the 
line :

PerlPostConfigRequire /usr/local/lib/modperl/startup.pl

and in your startup.pl script, add a line

use lib "/usr/local/lib/modperl";

and restart Apache.

After that, you can place all your newly-developed perl modules inside the directory 
/usr/local/lib/modperl, and Apache/mod_perl will find them.





RE: Ubuntu and mod_perl

2011-05-17 Thread Lloyd Richardson
If you are looking to run something on apache startup: 

PerlRequire /path/to/startup.pl



-Original Message-
From: Tom Kane [mailto:t.k...@mindspring.com] 
Sent: Tuesday, May 17, 2011 5:23 PM
To: modperl@perl.apache.org
Subject: Ubuntu and mod_perl

Thanks for all of the help. Just to let everyone know, it was embarrassing how 
simple it was to install mod_perl with the suggestions that I received from 
Cosimo Streppone earlier in the day. I didn't know that the apt-get and a2enmod 
steps were available as the perl.apache2.org mod_perl 2 documentation said I 
had to build both apache2 and mod_perl from the latest source from scratch. 
(Admittedly, I may have read too many assumptions into that.)

I will say that the "apt-get install" on apache2 did nothing as everything was 
already there on my system. The "apt-get install" on mod_perl did download a 
fair amount, however. And, thankfully, when I restarted apache2 after the 
a2enmod steps, I saw that mod_perl was indeed running. 

Had I only known the above steps, I'd have saved several days on the build 
process -- days that I would have much preferred applying to my application.

Now, I have another issue: I have created a startup.pl file and placed it into 
the conf.d directory. However, when I restart apache2 I get an error message to 
the effect that the first 'use' statement is a syntax error. I'm sure that my 
problem lies in my confusion as to (1) where to point ServerRoot, and (2) where 
I'm supposed to put my perl scripts. These are all pretty elementary, I 
suppose, but if anyone can shed any light, I will be very appreciative.

Tom


Re: Ubuntu and mod_perl

2011-05-17 Thread Fred Moyer
On Tue, May 17, 2011 at 3:22 PM, Tom Kane  wrote:
> Now, I have another issue: I have created a startup.pl file and placed it 
> into the conf.d
>  directory. However, when I restart apache2 I get an error message to the 
> effect that the first
> 'use' statement is a syntax error. I'm sure that my problem lies in my 
> confusion as to (1) where
> to point ServerRoot, and (2) where I'm supposed to put my perl scripts. These 
> are all pretty
> elementary, I suppose, but if anyone can shed any light, I will be very 
> appreciative.

You should have a line in your httpd.conf that looks something like
this.  If not, you will need to add it.

PerlPostConfigRequire /etc/apache2/conf.d/startup.pl


Ubuntu and mod_perl

2011-05-17 Thread Tom Kane
Thanks for all of the help. Just to let everyone know, it was embarrassing how 
simple it was to install mod_perl with the suggestions that I received from 
Cosimo Streppone earlier in the day. I didn't know that the apt-get and a2enmod 
steps were available as the perl.apache2.org mod_perl 2 documentation said I 
had to build both apache2 and mod_perl from the latest source from scratch. 
(Admittedly, I may have read too many assumptions into that.)

I will say that the "apt-get install" on apache2 did nothing as everything was 
already there on my system. The "apt-get install" on mod_perl did download a 
fair amount, however. And, thankfully, when I restarted apache2 after the 
a2enmod steps, I saw that mod_perl was indeed running. 

Had I only known the above steps, I'd have saved several days on the build 
process -- days that I would have much preferred applying to my application.

Now, I have another issue: I have created a startup.pl file and placed it into 
the conf.d directory. However, when I restart apache2 I get an error message to 
the effect that the first 'use' statement is a syntax error. I'm sure that my 
problem lies in my confusion as to (1) where to point ServerRoot, and (2) where 
I'm supposed to put my perl scripts. These are all pretty elementary, I 
suppose, but if anyone can shed any light, I will be very appreciative.

Tom


Re: Ubuntu and mod_perl

2011-05-17 Thread Fred Moyer
On Tue, May 17, 2011 at 2:05 PM, André Warnier  wrote:
> But if your main aim is not the installation of apache and mod_perl, then I
> would recommend to both, to use the software packaging system of your
> respective flavors of Linux, to install Apache, perl and mod_perl using
> these pre-packaged versions.
> That will take just a few minutes, and will work without having to spend
> hours resolving dependencies, fixing missing links (maybe wrongly), and
> creating your own startup scripts.
>
> And the hours you save will then be available for achieving your main goal.

This, a thousand times this.


Re: Install mod perl

2011-05-17 Thread André Warnier

marco wrote:
...
Maybe as a tip to both Tom and Marco :

It all depends if your focus is on installing apache and perl and mod_perl, or rather on 
just using them to achieve another main goal.


But if your main aim is not the installation of apache and mod_perl, then I would 
recommend to both, to use the software packaging system of your respective flavors of 
Linux, to install Apache, perl and mod_perl using these pre-packaged versions.
That will take just a few minutes, and will work without having to spend hours resolving 
dependencies, fixing missing links (maybe wrongly), and creating your own startup scripts.


And the hours you save will then be available for achieving your main goal.



Re: Ubuntu and mod_perl

2011-05-17 Thread André Warnier

Tom Kane wrote:

I'm still a little new at responding to mail lists. Here is an email that I 
sent directly in a reply to Marco. I thought that it should be shared:

Marco,

I had to do the following just the other day:

sudo ln -sf /usr/lib/libperl.so.5.10.1 /usr/lib/libperl.so

That got me over the hurdle that occurred because of the missing symbolic link 
to perl. I also had to do the following:

sudo ln -sf /usr/lib/libgdbm.so.3.0.0 /usr/lib/libgdbm.so

The libgdbm issue actually occurred prior to the perl problem.

I hope this helps. I am now trying to find the settings for mod_perl in the 
/etc/apache2 configuration. My startup.pl file returns an error message that I 
can't use 'use'.

Tom



Maybe as a tip to both Tom and Marco :

It all depends if your focus is on installing apache and perl and mod_perl, or rather on 
just using them to achieve another main goal.


But if your main aim is not the installation of apache and mod_perl, then I would 
recommend to both, to use the software packaging system of your respective flavors of 
Linux, to install Apache, perl and mod_perl using these pre-packaged versions.
That will take just a few minutes, and will work without having to spend hours resolving 
dependencies, fixing missing links (maybe wrongly), and creating your own startup scripts.


And the hours you save will then be available for achieving your main goal.



Re: Ubuntu and mod_perl

2011-05-17 Thread William A. Rowe Jr.
On 5/17/2011 3:39 PM, Tom Kane wrote:
> I'm still a little new at responding to mail lists. Here is an email that I 
> sent directly in a reply to Marco. I thought that it should be shared:
> 
> Marco,
> 
> I had to do the following just the other day:
> 
> sudo ln -sf /usr/lib/libperl.so.5.10.1 /usr/lib/libperl.so
> 
> That got me over the hurdle that occurred because of the missing symbolic 
> link to perl. I also had to do the following:
> 
> sudo ln -sf /usr/lib/libgdbm.so.3.0.0 /usr/lib/libgdbm.so
> 
> The libgdbm issue actually occurred prior to the perl problem.
> 
> I hope this helps. I am now trying to find the settings for mod_perl in the 
> /etc/apache2 configuration. My startup.pl file returns an error message that 
> I can't use 'use'.

Tom, it seems you are missing gdbm-devel and perl-devel packages.  To get
the appropriate .a/.so/.h files, you usually have to add -devel (or -dev)
flavors of various system components to build new software against them.


Ubuntu and mod_perl

2011-05-17 Thread Tom Kane
I'm still a little new at responding to mail lists. Here is an email that I 
sent directly in a reply to Marco. I thought that it should be shared:

Marco,

I had to do the following just the other day:

sudo ln -sf /usr/lib/libperl.so.5.10.1 /usr/lib/libperl.so

That got me over the hurdle that occurred because of the missing symbolic link 
to perl. I also had to do the following:

sudo ln -sf /usr/lib/libgdbm.so.3.0.0 /usr/lib/libgdbm.so

The libgdbm issue actually occurred prior to the perl problem.

I hope this helps. I am now trying to find the settings for mod_perl in the 
/etc/apache2 configuration. My startup.pl file returns an error message that I 
can't use 'use'.

Tom


Re: Install mod perl

2011-05-17 Thread André Warnier

marco,

under which version/distribution of Linux are you doing this ?
(the answer I am looking for is something like Debian or Ubuntu or RedHat..)

The reason I am asking you, is that each of these distributions has a "package" system, 
which you can probably use to install apache and perl and mod_perl using just a couple of 
commands, and not have to bother doing it "the hard way".


See the answer of Cosimo Streppone previously today in the same mod_perl list, subject : 
Ubuntu and mod_perl.


Re: APR does not understand this error code

2011-05-17 Thread Torsten Förtsch
On Tuesday, May 10, 2011 21:15:29 Thomas den Braber wrote:
> In http://www.gossamer-threads.com/lists/modperl/dev/102357 it
> looks like it is solved.

Thomas, could you please check if the patch at

  http://www.gossamer-threads.com/lists/modperl/dev/102983#102983

fixes your problem? It sounds quite similar. BTW, I have tried to 
reproduce the problem on Linux without success.

On Tuesday, May 17, 2011 17:27:29 Steve Hay wrote:
> Any thoughts on whether this change is good to commit?

Steve, I have tried your patch on my linux box. It passes all tests 
successfully. So, I think go ahead and commit it.

One thing I don't catch, can this thing happen only in 
mpxs_Apache2__RequestRec_rflush()? I believe it can also happen in all 
the other write operations. If the process crashes on this error I think 
they should also be fixed. Though, without a proper test case it's like 
fishing in murky waters.

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net


Re: Install mod perl

2011-05-17 Thread marco

Il 17/05/2011 20.03, Fred Moyer ha scritto:

Try running 'perl Makefile.PL MP_APXS=/usr/local/bin/apxs'

On Tue, May 17, 2011 at 11:01 AM, marco  wrote:

Hi all,
I tried to install mod_perl in a dynamic mode in Linux 10.04 but it doesn't
work. The installation stops.
I typed:
$cd mod_perl-2.0.5
I have installed apache from source files(v2.2.18), so the next step i tried
is:
$perl Makefile.PL EVERYTHING=1 USE_APXS=1 WITH_APXS=/usr/local/apache/bin/
but it prints me on display this:

Reading Makefile.PL args from @ARGV
no conflicting prior mod_perl version found - good.

Next we need to know where the 'apxs' script is located. This script
provides a lot of information about the Apache installation, and makes
it easier to find things on your system. Normally it's located in the
same directory as the 'httpd' executable.

If you don't yet have Apache installed you can build Apache against
the Apache source code, but you won't be able to run the test suite (a
very important step). Therefore you may want to install Apache before
proceeding.


Please provide a full path to 'apxs' executable
(press Enter if you don't have it installed):

But I have installed yet apache and apxs.
apxs is located on directory /usr/local/apache/bin, so what can i do to
compile mod_perl.
What's the matter?

Bye


I'm sorry but the first step is ok, but it gives some warning:
*[warning] mod_perl dso library will be built as mod_perl.so
[warning] You'll need to add the following to httpd.conf:
[warning]
[warning]   LoadModule perl_module modules/mod_perl.so
[warning]
[warning] depending on your build, mod_perl might not live in
[warning] the modules/ directory.

[warning] Check the results of
[warning]
[warning]   $ /usr/local/apache/bin/apxs -q LIBEXECDIR
[warning]
[warning] and adjust the LoadModule directive accordingly.*

Then I typed *make* but it exit with error:
*
/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status
make[1]: *** [mod_perl.so] Error 1
make[1]: Leaving directory `/home/marcolino/mod_perl-2.0.5/src/modules/perl'
make: *** [modperl_lib] Error 2*

What can i do?Any idea?

Thanks


Re: Install mod perl

2011-05-17 Thread marco

Il 17/05/2011 20.03, Fred Moyer ha scritto:

Try running 'perl Makefile.PL MP_APXS=/usr/local/bin/apxs'

On Tue, May 17, 2011 at 11:01 AM, marco  wrote:

Hi all,
I tried to install mod_perl in a dynamic mode in Linux 10.04 but it doesn't
work. The installation stops.
I typed:
$cd mod_perl-2.0.5
I have installed apache from source files(v2.2.18), so the next step i tried
is:
$perl Makefile.PL EVERYTHING=1 USE_APXS=1 WITH_APXS=/usr/local/apache/bin/
but it prints me on display this:

Reading Makefile.PL args from @ARGV
no conflicting prior mod_perl version found - good.

Next we need to know where the 'apxs' script is located. This script
provides a lot of information about the Apache installation, and makes
it easier to find things on your system. Normally it's located in the
same directory as the 'httpd' executable.

If you don't yet have Apache installed you can build Apache against
the Apache source code, but you won't be able to run the test suite (a
very important step). Therefore you may want to install Apache before
proceeding.


Please provide a full path to 'apxs' executable
(press Enter if you don't have it installed):

But I have installed yet apache and apxs.
apxs is located on directory /usr/local/apache/bin, so what can i do to
compile mod_perl.
What's the matter?

Bye


Ok, i solved it.
Thanks for your suggests!!


Re: Install mod perl

2011-05-17 Thread marco

Il 17/05/2011 20.03, Fred Moyer ha scritto:

Try running 'perl Makefile.PL MP_APXS=/usr/local/bin/apxs'

On Tue, May 17, 2011 at 11:01 AM, marco  wrote:

Hi all,
I tried to install mod_perl in a dynamic mode in Linux 10.04 but it doesn't
work. The installation stops.
I typed:
$cd mod_perl-2.0.5
I have installed apache from source files(v2.2.18), so the next step i tried
is:
$perl Makefile.PL EVERYTHING=1 USE_APXS=1 WITH_APXS=/usr/local/apache/bin/
but it prints me on display this:

Reading Makefile.PL args from @ARGV
no conflicting prior mod_perl version found - good.

Next we need to know where the 'apxs' script is located. This script
provides a lot of information about the Apache installation, and makes
it easier to find things on your system. Normally it's located in the
same directory as the 'httpd' executable.

If you don't yet have Apache installed you can build Apache against
the Apache source code, but you won't be able to run the test suite (a
very important step). Therefore you may want to install Apache before
proceeding.


Please provide a full path to 'apxs' executable
(press Enter if you don't have it installed):

But I have installed yet apache and apxs.
apxs is located on directory /usr/local/apache/bin, so what can i do to
compile mod_perl.
What's the matter?

Bye


It prints:
*Reading Makefile.PL args from @ARGV
   MP_APXS = /usr/local/bin/apxs
no conflicting prior mod_perl version found - good.
[  error] Unable to determine server version, aborting.
[  error] Invalid MP_APXS specified?
*
Directory /usr/local/bin/ does not contains apxs.


Re: Install mod perl

2011-05-17 Thread Fred Moyer
Try running 'perl Makefile.PL MP_APXS=/usr/local/bin/apxs'

On Tue, May 17, 2011 at 11:01 AM, marco  wrote:
> Hi all,
> I tried to install mod_perl in a dynamic mode in Linux 10.04 but it doesn't
> work. The installation stops.
> I typed:
> $cd mod_perl-2.0.5
> I have installed apache from source files(v2.2.18), so the next step i tried
> is:
> $perl Makefile.PL EVERYTHING=1 USE_APXS=1 WITH_APXS=/usr/local/apache/bin/
> but it prints me on display this:
>
> Reading Makefile.PL args from @ARGV
> no conflicting prior mod_perl version found - good.
>
> Next we need to know where the 'apxs' script is located. This script
> provides a lot of information about the Apache installation, and makes
> it easier to find things on your system. Normally it's located in the
> same directory as the 'httpd' executable.
>
> If you don't yet have Apache installed you can build Apache against
> the Apache source code, but you won't be able to run the test suite (a
> very important step). Therefore you may want to install Apache before
> proceeding.
>
>
> Please provide a full path to 'apxs' executable
> (press Enter if you don't have it installed):
>
> But I have installed yet apache and apxs.
> apxs is located on directory /usr/local/apache/bin, so what can i do to
> compile mod_perl.
> What's the matter?
>
> Bye
>


Install mod perl

2011-05-17 Thread marco

Hi all,
I tried to install mod_perl in a dynamic mode in Linux 10.04 but it 
doesn't work. The installation stops.

I typed:
$cd mod_perl-2.0.5
I have installed apache from source files(v2.2.18), so the next step i 
tried is:

$perl Makefile.PL EVERYTHING=1 USE_APXS=1 WITH_APXS=/usr/local/apache/bin/
but it prints me on display this:

*Reading Makefile.PL args from @ARGV
no conflicting prior mod_perl version found - good.

_Next we need to know where the 'apxs' script is located._ This script
provides a lot of information about the Apache installation, and makes
it easier to find things on your system. Normally it's located in the
same directory as the 'httpd' executable.

If you don't yet have Apache installed you can build Apache against
the Apache source code, but you won't be able to run the test suite (a
very important step). Therefore you may want to install Apache before
proceeding.


Please provide a full path to 'apxs' executable
(press Enter if you don't have it installed):*

But I have installed yet apache and apxs.
apxs is located on directory /usr/local/apache/bin, so what can i do to 
compile mod_perl.

What's the matter?

Bye


Re: write handler for apache http request

2011-05-17 Thread Randolf Richardson
> Il 17/05/2011 18.37, André Warnier ha scritto:
[sNip]
> > So what is wrong with the example section of
> > http://perl.apache.org/docs/2.0/user/handlers/server.html#C_PerlPostConfigHandler_
[sNip]
> Sorry, I did explain not very well.
> I tell you my problem. I want to write a simple perl handler that must
> be executed only in the post-read-request phase of http request cycle.
> So the module must be a PerlPostConfigHandler.
> I never worked with this and I don't know how to start do this.
> How can I load this module on apache?
> How can I write this module if, for example, I want to "write a file"
> when this handler is invoked?
>
> Thanks

You probably want this handler:

PerlPostReadRequestHandler

http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlPostReadRe
questHandler

There's a code example included on that web page, and then in
httpd.conf you'll need to specify your source code file with the
PerlPostReadRequestHandler configuration directive.

Randolf Richardson - rand...@inter-corporate.com
Inter-Corporate Computer & Network Services, Inc.
Vancouver, British Columbia, Canada
http://www.inter-corporate.com




Re: write handler for apache http request

2011-05-17 Thread marco

Il 17/05/2011 18.37, André Warnier ha scritto:

marco wrote:

Hi all,
I want to write an handler in perl to manage the 
|PerlPostConfigHandler| 
, 
but i don't know how to do this.

Can someone help me?


So what is wrong with the example section of
http://perl.apache.org/docs/2.0/user/handlers/server.html#C_PerlPostConfigHandler_ 


?

Maybe your question was not phrased very well.

What do you want to do/achieve with this ?
Or what is the part you are missing ?


Sorry, I did explain not very well.
I tell you my problem. I want to write a simple perl handler that must 
be executed only in the post-read-request phase of http request cycle. 
So the module must be a PerlPostConfigHandler.

I never worked with this and I don't know how to start do this.
How can I load this module on apache?
How can I write this module if, for example, I want to "write a file" 
when this handler is invoked?


Thanks


Re: write handler for apache http request

2011-05-17 Thread André Warnier

marco wrote:

Hi all,
I want to write an handler in perl to manage the |PerlPostConfigHandler| 
, 
but i don't know how to do this.

Can someone help me?


So what is wrong with the example section of
http://perl.apache.org/docs/2.0/user/handlers/server.html#C_PerlPostConfigHandler_
?

Maybe your question was not phrased very well.

What do you want to do/achieve with this ?
Or what is the part you are missing ?



write handler for apache http request

2011-05-17 Thread marco

Hi all,
I want to write an handler in perl to manage the |PerlPostConfigHandler| 
, 
but i don't know how to do this.

Can someone help me?

|| 
|| 
 



Re: Ubuntu and mod_perl

2011-05-17 Thread Cosimo Streppone

On Wed, 18 May 2011 00:05:46 +1000, Tom Kane  wrote:


I now want to add mod_perl (in the .so form) to apache2.
[...]
I am still new in the Unix/Linux environment -- at least from the  
standpoint of installing systems software -- so I am sure I am missing  
something.


Hi Tom,

if you don't need to compile the software yourself,
and you're just starting, I would suggest an easy path:

  # Install the relevant packages
  sudo apt-get install apache2 apache2-mpm-prefork
  sudo apt-get install libapache2-mod-perl2 libapache2-mod-apreq2

  # Enable the apreq and mod perl modules
  a2enmod apreq
  a2enmod perl

  # Restart apache
  /etc/init.d/apache2 restart

--
Cosimo


Ubuntu and mod_perl

2011-05-17 Thread Tom Kane
I have just created a new system with Ubuntu LTS 10.04. Everything there is 
working smoothly. I have apache2 loading and running automatically when I boot.

I now want to add mod_perl (in the .so form) to apache2. I have faithfully 
followed the mod_perl 2 installation directions in the documentation from 
perl.apache.org. The builds were with httpd-2.2.18.tar.gz and 
mod_perl-2.0-current.tar.gz. All tests ran cleanly. 'make install' worked for 
both mod_perl and apache2.

[Aside: I am aware that some confusion exists in nomenclature due to 
Debian/Ubuntu using different names for things, e.g., they refer to httpd.conf 
as apache2.conf. Note that the mod_perl build did create a file named 
'httpd.conf' in one of my subdirectories.]

The build of the apache2 and mod_perl modules went into the directory:

/home/tomkane/httpd

in their respective subdirectories as the build directions suggested. However, 
when I restart my server I still see apache2 version 2.2.14 running (it came 
with the Ubuntu installation).

I am still new in the Unix/Linux environment -- at least from the standpoint of 
installing systems software -- so I am sure I am missing something. I took the 
installation directions literally as I didn't really know how to read between 
the lines as more experienced folks would have done. 

I think I need to copy the apache2 executable for version 2.2.18 (at the very 
least) to the directory:

/usr/lib/apache2/mpm-prefork/apache2

but I am not sure. I may need to copy a lot more files as well but don't feel 
secure enough to try that. 

Can anyone point me toward the missing piece(s)? (Note: The Ubuntu server forum 
seems devoid of mod_perl knowledge.)

Thanks.

Tom Kane