Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58017 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26980 invoked from network); 24 Feb 2012 20:30:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2012 20:30:25 -0000 Authentication-Results: pb1.pair.com header.from=tom@punkave.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tom@punkave.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain punkave.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: tom@punkave.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:59189] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/A7-17132-D53F74F4 for ; Fri, 24 Feb 2012 15:30:23 -0500 Received: by lagk11 with SMTP id k11so3476175lag.29 for ; Fri, 24 Feb 2012 12:30:18 -0800 (PST) Received-SPF: pass (google.com: domain of tom@punkave.com designates 10.112.101.40 as permitted sender) client-ip=10.112.101.40; Authentication-Results: mr.google.com; spf=pass (google.com: domain of tom@punkave.com designates 10.112.101.40 as permitted sender) smtp.mail=tom@punkave.com Received: from mr.google.com ([10.112.101.40]) by 10.112.101.40 with SMTP id fd8mr1557895lbb.17.1330115418004 (num_hops = 1); Fri, 24 Feb 2012 12:30:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.101.40 with SMTP id fd8mr1277558lbb.17.1330115417917; Fri, 24 Feb 2012 12:30:17 -0800 (PST) Received: by 10.152.6.136 with HTTP; Fri, 24 Feb 2012 12:30:17 -0800 (PST) In-Reply-To: References: Date: Fri, 24 Feb 2012 15:30:17 -0500 Message-ID: Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkLVUHwfpCh3araJeHEYPqKAvXWs2b7WEvo4QCsdM7d88gQvU9WE9XfKYEmUKi0fD2bDhjP Subject: Re: [PHP-DEV] pecl, zts, non-zts, fastcgi and Apache From: tom@punkave.com (Tom Boutell) Good point. Last I tried that it worked poorly - I couldn't find a bytecode cache that worked with it, performance was poor - and I switched to the Microsoft accelerator and IIS. But things may have changed. Doesn't really explain it on Linux... But what I really want to know is just how to get predictable behavior in my script - after installing a new PHP and pecl I should be able to do pecl installs and have them show up in the right extensions folder for the PHP I just built, but no such luck. (Yes, /usr/local/bin/pecl is the one I just built.) On Fri, Feb 24, 2012 at 3:08 PM, Kris Craig wrote: > As far as Windows is concerned, it is worth noting that the Apache mod_ph= p > (i.e. ZTS) build is supported.=A0 Also, though my information is a bit > outdated, last I heard work was being done to support thread-safe PHP as = an > ISAPI module on IIS, though I don't know what the status of that is. > > --Kris > > > > On Fri, Feb 24, 2012 at 11:52 AM, Tom Boutell wrote: >> >> I'm building a script that installs PHP 5.3.10 from source. One of the >> steps is to install apc and mongo support via pecl. I'm building the >> CGI/FastCGI version. This is on a box that formerly had mod_php >> installed. >> >> If I do 'make install' of PHP (which installs a new pecl binary) and >> follow it up immediately with 'pecl install apc', the apc extension >> winds up here: >> >> /usr/local/lib/php/extensions/no-debug-zts-20090626 >> >> That's not what command line php and php-cgi are looking for, so they >> produce warnings and don't load the extensions. >> >> However If I do the pecl install later - possibly after restarting >> Apache with fastcgi enabled - it installs to the new, correct place: >> >> no-debug-non-zts-20090626 >> >> The warnings go away, and everything is great. >> >> This raises two questions about which no documentation seems to exist >> after quite a bit of searching and which raise questions about whether >> PHP is doing sensible things, so I took the liberty of bringing them >> to folks who actually understand PHP's internals. >> >> 1. You only get one pecl binary although you may have many SAPIs >> installed. mod_php defaults to thread-safe (and there seems to be no >> way to turn that off on Linux), while php-cgi does not. So how does >> pecl decide which way to build extensions? I tried setting >> extensions_dir via config-set, but that setting was ignored (unless >> perhaps it falls back if the folder doesn't exist yet?). How can I >> ensure that, having just installed PHP and pecl, my next pecl install >> will build extensions for the right flavor of PHP? >> >> 2. Why does php turn on thread-safety for mod_php at all on Linux, >> given that it apparently still doesn't work very well with various >> extensions in a genuinely multithreaded situation, slows things down, >> takes more memory, and leads to problems like this one? >> >> Everyone I've found runs PHP under the Apache prefork MPM, which does >> not attempt to run PHP in multiple threads of one process. I have >> never seen anyone successfully use the worker MPM with PHP, except by >> moving PHP out to a fastcgi process pool, which is, again, >> single-process PHP. >> >> Even Microsoft's PHP accelerator uses the fastcgi-based, >> one-process-per-PHP-request approach. Since Windows is so >> thread-oriented that seems significant. >> >> I have attached my script. >> >> Thanks for any insight! >> >> On Sun, Feb 5, 2012 at 9:59 AM, Nikita Popov >> wrote: >> > Hi internals! >> > >> > I have written an RFC that proposes to *deprecate* and *remove* the /e >> > modifier: >> > >> > https://wiki.php.net/rfc/remove_preg_replace_eval_modifier >> > >> > Comments welcome! >> > >> > -- >> > PHP Internals - PHP Runtime Development Mailing List >> > To unsubscribe, visit: http://www.php.net/unsub.php >> > >> >> >> >> -- >> Tom Boutell >> P'unk Avenue >> 215 755 1330 >> punkave.com >> window.punkave.com >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com