Re: [RFC] APXS LoadModule Option in configure

From: Date: Sat, 25 Feb 2012 00:42:00 +0000
Subject: Re: [RFC] APXS LoadModule Option in configure
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message


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 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: [email protected] Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/

Thread (27 messages)

« previous php.internals (#58058) next »