Re: pecl, zts, non-zts, fastcgi and Apache

From: Date: Tue, 28 Feb 2012 09:13:23 +0000
Subject: Re: pecl, zts, non-zts, fastcgi and Apache
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-58230@lists.php.net to get a copy of this message
On Mon, Feb 27, 2012 at 10:12 PM, William A. Rowe Jr. <wrowe@rowe-clan.net>wrote: > On 2/27/2012 6:58 AM, jpauli wrote: > > PHP through mod_php on Linux should compile without ZTS. > > > > configure script searches for apxs binary and tries to invoque "apxs -q > > MPM" to figure out what MPM has been compiled in Apache for the TS flag > to > > be defined or not (thus, activating PHP ZTS, or not). > > Right... > > > Mainly on Linux, Apache should have been installed with prefork MPM ans > > "apxs -q" should return that, then configure should not define > > PHP_BUILD_THREAD_SAFE. > > No, 2.2 and 2.4 don't default to prefork, it's suboptimal, most linux > distros have moved away from it... > > Sorry but 2.2 defaults to prefork. The new 2.4 platform has introduced loadable MPM, like any other module , thus we cant detect through apxs which MPM is used anymore. For this, we would need to play with httpd -M > > 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). > The only mod_php loadable under any circumstance is TS enabled. > Yes, but ZTS has a performance/memory penalty due to globals locks. I would much prefer having a nonZTS PHP together with a non threaded MPM Julien.P > If you want php/linux single-child, fastcgi is the only rational approach. > > > I dont know anything about windows, sorry > > Always threaded. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#58230) next »