Oh ok, I think I see where you're getting confused.

This problem occurs when your LoadModule statement is in a *separate* .conf
file; i.e. using the "Include" statement.  APXS cannot detect this and just
sticks a LoadModule into the main .conf file.  This is what causes the
duplication.  It's a very common issue as many people (myself included)
prefer to keep their PHP configurations separate.

--Kris


On Fri, Feb 24, 2012 at 4:42 PM, Christopher Jones <
christopher.jo...@oracle.com> wrote:

>
>
> On 02/24/2012 04:14 PM, Kris Craig wrote:
>
>> No, it happens and it's even clearly documented in APXS.
>>
>> Basically, if you specify the "-a" option in APXS, it overwrites your
>> httpd.conf (or apache.conf or whatever it is on your system) and adds the
>> LoadModule line to it.  In PHP's configure script, you'll notice that "-a"
>> is always specified; there's no option to use APXS without it.  As a
>> result, "make install" will always overwrite your LoadModule entry in
>> httpd.conf if APXS is enabled.  The problem occurs when you have
>> LoadModule
>> in an included .conf file already; APXS does not have the ability to
>> detect
>> that.  Therefore, a "duplicate" LoadModule entry is added to httpd.conf by
>> APXS, and thus the clash occurs.  This behavior has been reproduced
>> numerous times.
>>
>
> I can start with a LoadModule line, run the exact apxs command that
> the PHP Makefile executes and I still have only one LoadModule in the
> file.  Note the time stamp of the file changes.
>
>  cjones:~/phpbuild/php53 $ ls -l /home/cjones/apache22/conf/**httpd.conf
>  -rw-r--r-- 1 cjones cjones 13998 2012-02-24 16:30
> /home/cjones/apache22/conf/**httpd.conf
>
>  cjones:~/phpbuild/php53 $ grep libphp5 /home/cjones/apache22/conf/**
> httpd.conf
>  LoadModule php5_module        modules/libphp5.so
>
>  cjones:~/phpbuild/php53 $ /home/cjones/apache22/bin/apxs -S
> LIBEXECDIR=/home/cjones/**apache22/modules -S 
> SYSCONFDIR=/home/cjones/**apache22/conf
> -i -a -n php5 libphp5.la
>  /home/cjones/apache22/build/**instdso.sh 
> SH_LIBTOOL='/home/cjones/**apache22/build/libtool'
> libphp5.la /home/cjones/apache22/modules
>  /home/cjones/apache22/build/**libtool --mode=install cp 
> libphp5.la/home/cjones/apache22/modules/
>  cp .libs/libphp5.so /home/cjones/apache22/modules/**libphp5.so
>  cp .libs/libphp5.lai 
> /home/cjones/apache22/modules/**libphp5.la<http://libphp5.la>
>  libtool: install: warning: remember to run `libtool --finish
> /home/cjones/phpbuild/php53 /libs'
>  chmod 755 /home/cjones/apache22/modules/**libphp5.so
>  [activating module `php5' in /home/cjones/apache22/conf/**httpd.conf]
>
>  cjones:~/phpbuild/php53 $ ls -l /home/cjones/apache22/conf/**httpd.conf
>  -rw-r--r-- 1 cjones cjones 13998 2012-02-24 16:33
> /home/cjones/apache22/conf/**httpd.conf
>
>  cjones:~/phpbuild/php53 $ grep libphp5 /home/cjones/apache22/conf/**
> httpd.conf
>  LoadModule php5_module        modules/libphp5.so
>
> I could interpolate the "apxs -a" documentation that says "or by
> enabling it if it already exists" to support what I see.
>
> Good luck with your RFC,
>
> Chris
>
>
> --
> Email: christopher.jo...@oracle.com
> Tel:  +1 650 506 8630
> Blog:  http://blogs.oracle.com/opal/
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to