Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58059 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98106 invoked from network); 25 Feb 2012 00:44:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Feb 2012 00:44:54 -0000 Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-ww0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:36957] helo=mail-ww0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/67-17132-40F284F4 for ; Fri, 24 Feb 2012 19:44:53 -0500 Received: by wgbdq12 with SMTP id dq12so2420391wgb.11 for ; Fri, 24 Feb 2012 16:44:50 -0800 (PST) Received-SPF: pass (google.com: domain of kris.craig@gmail.com designates 10.216.132.94 as permitted sender) client-ip=10.216.132.94; Authentication-Results: mr.google.com; spf=pass (google.com: domain of kris.craig@gmail.com designates 10.216.132.94 as permitted sender) smtp.mail=kris.craig@gmail.com; dkim=pass header.i=kris.craig@gmail.com Received: from mr.google.com ([10.216.132.94]) by 10.216.132.94 with SMTP id n72mr2405149wei.4.1330130690230 (num_hops = 1); Fri, 24 Feb 2012 16:44:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FJGaOp6W5wpuc7egLY0a7+z6ABZV6q98tRZAyMgfkFI=; b=g2PKL9MLX6o6dUv+9dbxgGIFgr16Eihn7Y3te0CwyZeCqGUZin60anAMjgfWpGfLvo eRAGw7tTt8O4mvAmkiw4cQ4SZKUor7rtMgJatcyoPanPiagtJNJRbuBamKQy+iY3fA1h CCvku5427iClMnFWFXxB22Fwz+0oNSR4HH7gM= MIME-Version: 1.0 Received: by 10.216.132.94 with SMTP id n72mr1927484wei.4.1330130690070; Fri, 24 Feb 2012 16:44:50 -0800 (PST) Received: by 10.223.75.146 with HTTP; Fri, 24 Feb 2012 16:44:50 -0800 (PST) In-Reply-To: <4F482E58.9020802@oracle.com> References: <4F481E93.1090400@oracle.com> <4F482524.6060106@oracle.com> <4F482E58.9020802@oracle.com> Date: Fri, 24 Feb 2012 16:44:50 -0800 Message-ID: To: Christopher Jones Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=0016e6da7d6449593804b9bf2f13 Subject: Re: [PHP-DEV] [RFC] APXS LoadModule Option in configure From: kris.craig@gmail.com (Kris Craig) --0016e6da7d6449593804b9bf2f13 Content-Type: text/plain; charset=ISO-8859-1 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.jones@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 > 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.jones@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 > > --0016e6da7d6449593804b9bf2f13--