Gossamer Forum
Home : General : Perl Programming :

strange problem of DSO installation of mod_perl

Quote Reply
strange problem of DSO installation of mod_perl
Hello,

I want to iinstall a DSO installation of mod_perl using apxs

I do the following after untar the right mod_perl distribution (mod_perl 1.27).

$ gunzip <mod_perl-1.X.tar.gz | tar xvf -
$ cd mod_perl-1.X
$ perl Makefile.PL \
USE_APXS=1 \
WITH_APXS=/path/to/bin/apxs \
EVERYTHING=1 \
[..]
$ make
$ make test
$ make install


This seems to work probably, but i get the following error at the end of the installation proces (make install):

apxs:Error: Activation failed for custom
/usr/local/etc/httpd/conf/httpd.conf file.
apxs:Error: At least one `LoadModule' directive already has to exist.
make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/files/mod_perl-1.27/apaci'
make: *** [apxs_install] Error 2


Any idea what this error is & how to solve this problem

system variables are:

perl 5.6.1

Apache/1.3.26 (Unix) PHP/4.2.1 FrontPage/4.0.4.3 mod_ssl/2.8.9 OpenSSL/0.9.6d



thanks,
Quote Reply
Re: [ridesworld] strange problem of DSO installation of mod_perl In reply to
It sounds like you have no LoadModule lines in your httpd.conf file or do you?
Quote Reply
Re: [Paul] strange problem of DSO installation of mod_perl In reply to
I have no LoadModule in my conf file.

I do not know exactly what to add to gem a proper install of mod_perl, this is not my daily routine work.
Quote Reply
Re: [ridesworld] strange problem of DSO installation of mod_perl In reply to
Try:

httpd -l

What does it print out? Sounds like either your AddModule/LoadModule are in an included file, or you aren't using dso's. Sadly, apxs, doesn't follow includes.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] strange problem of DSO installation of mod_perl In reply to
Hello Alex

I did httpd -l
and it returns:

Compiled-in modules:
http_core.c
mod_so.c
suexec: disabled; invalid wrapper /usr/sbin/suexec

The rights of ssuexec are rwx--x--x

thats all i have.
Quote Reply
Re: [ridesworld] strange problem of DSO installation of mod_perl In reply to
Hi,

Ok, that means you do have DSO enabled. What is most likely the error is your AddModule/LoadModule statements are in a separete file that is included. Sadly, apxs can't follow includes so it is fatalling saying it doesn't know where to add the directives.

The easiest way around this is to find out where your AddModule/LoadModule directives are, and copy them into the main httpd.conf temporairly and then run make install. Once the install is done, you'll see it added one new AddModule and one new LoadModule line to your httpd.conf file. Copy these new lines to wherever your original LoadModule/Addmodule statements are, and then remove the lines you added to the main httpd.conf.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] strange problem of DSO installation of mod_perl In reply to
There is an include folder in the httpd folder

This folder has a lot of .h files and the most files belongs to Apache.

there are files like:

httpd.h, httpd_protocol.h, hsregex,h scoreboard.h and more.

I can't see any LoadModule strings & tags inside these files.

do you know which file it could be?