Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58256 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17357 invoked from network); 28 Feb 2012 16:51:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2012 16:51:57 -0000 Authentication-Results: pb1.pair.com header.from=wrowe@rowe-clan.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=wrowe@rowe-clan.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain rowe-clan.net from 173.201.192.111 cause and error) X-PHP-List-Original-Sender: wrowe@rowe-clan.net X-Host-Fingerprint: 173.201.192.111 p3plsmtpa06-10.prod.phx3.secureserver.net Linux 2.6 Received: from [173.201.192.111] ([173.201.192.111:56640] helo=p3plsmtpa06-10.prod.phx3.secureserver.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/E3-34356-C260D4F4 for ; Tue, 28 Feb 2012 11:51:56 -0500 Received: (qmail 11050 invoked from network); 28 Feb 2012 16:51:53 -0000 Received: from unknown (76.252.112.72) by p3plsmtpa06-10.prod.phx3.secureserver.net (173.201.192.111) with ESMTP; 28 Feb 2012 16:51:52 -0000 Message-ID: <4F4D05FE.607@rowe-clan.net> Date: Tue, 28 Feb 2012 10:51:10 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Christopher Jones CC: internals@lists.php.net References: <5a1d155ad465d1ec2e6461f5347d859f.squirrel@www.l-i-e.com> <4F4BF1C6.8010104@rowe-clan.net> <4F4C23CB.30402@oracle.com> In-Reply-To: <4F4C23CB.30402@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] pecl, zts, non-zts, fastcgi and Apache From: wrowe@rowe-clan.net ("William A. Rowe Jr.") On 2/27/2012 6:46 PM, Christopher Jones wrote: > > On 02/27/2012 01:12 PM, William A. Rowe Jr. wrote: >> On 2/27/2012 6:58 AM, jpauli wrote: > >>> Recently we had a bug with the new Apache 2.4 API where apxs doesn't answer >>> about the MPM configuration anymore, leading to a ZTS build by default. >>> This bug has now been fixed, was https://bugs.php.net/bug.php?id=61172. >> >> Wrong fix. Out of the box you don't know which mpm may be loaded, because >> the mpm is now loadable (although a full daemon stop/start is necessary). > > Can you expand & explain this, with an eye to resolving 61172? > Are you saying Apache 2.4 'httpd -M' might not return the mpm? The mpm is now a loadable module, not compiled in. The recommended default mpm is now event, the recommended .rpm proposes shipping event/worker/prefork, all as modules. The user is *free* to switch mpm's at any point by simply editing their httpd.conf file, so what was a non-threaded server becomes a threaded one. httpd -l will not return what you want, httpd -M will, but is not the right solution... # bin/httpd -l Compiled in modules: core.c mod_so.c http_core.c # bin/httpd -M Loaded Modules: core_module (static) so_module (static) http_module (static) ... version_module (shared) mpm_event_module (shared) unixd_module (shared) ... The httpd -V command was always the correct way to test for threaded'ness, which would allow supporting an mpm which was not known to you. Again, it will only reflect the currently loaded module (and fail if no MPM is loaded); # bin/httpd -V Server version: Apache/2.4.1 (Unix) Server built: Feb 28 2012 10:37:32 Server's Module Magic Number: 20120211:0 Server loaded: APR 1.4.5, APR-UTIL 1.3.12 Compiled using: APR 1.4.5, APR-UTIL 1.3.12 Architecture: 64-bit Server MPM: event threaded: yes (fixed thread count) forked: yes (variable process count) ... Editing httpd.conf... s/event/prefork/ results in ... Server MPM: prefork threaded: no forked: yes (variable process count) In 2.2 the default MPM became worker. In 2.4 the default MPM is now event, so prefork hasn't been the default in some 7 years. The only sensible build for mod_php is ZTS, which will load and operate whichever mpm is loaded by the user. The only sensible single thread environment is cgi (enhanced, of course, with fastcgi!)