Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84345 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71600 invoked from network); 5 Mar 2015 16:32:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Mar 2015 16:32:02 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain lerdorf.com designates 209.85.192.174 as permitted sender) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.192.174 mail-pd0-f174.google.com Received: from [209.85.192.174] ([209.85.192.174:33322] helo=mail-pd0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/D5-40418-10588F45 for ; Thu, 05 Mar 2015 11:32:02 -0500 Received: by pdev10 with SMTP id v10so21068780pde.0 for ; Thu, 05 Mar 2015 08:31:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=a6JpaSPuwSAPZfDiKe9Rk9+03lne2CmaS6rFjKx+ZzY=; b=RKJXb+3F/vSinuKJ99AXz26QIEctUEC+zOPV3MP4czcREyTALvtpI6DnyC7hEXI00u HrqLfFsBp2CEZkTrtXThtn01CmuQKAhw3KqvML67IVoTvIPLObjeoCiS7JDeDdH8vz3l MUMUxuIkxbBdX7/cLgOu3blcbYehTg+Ux3CQxupek/0jJNOAzlYldwZmVniCgoRZtWEi YQW5WAqCB8MU6UtppzxXn3TLzFPxp6fL6et4bdOm4JVny9QyLzsTbNubpvABXdPT3pCG J56859U2aRRzUHFphaJ4HYcWIqP87MvJDHsmjmmvKbH7xq+YebFcCkTYZpjy0rZiU7qr yzpg== X-Gm-Message-State: ALoCoQnXZ2dgDl+l77tIgTZf3i/hZIgg5eA24TRHbFmSDBNEZwjSmWFZDdYt/pamY3ionaXiS2nr X-Received: by 10.70.123.1 with SMTP id lw1mr17760456pdb.26.1425573117943; Thu, 05 Mar 2015 08:31:57 -0800 (PST) Received: from [192.168.200.14] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPSA id ot6sm7401938pdb.28.2015.03.05.08.31.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 08:31:57 -0800 (PST) Message-ID: <54F884FC.2080208@lerdorf.com> Date: Thu, 05 Mar 2015 08:31:56 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: j adams , internals References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="thK2iAvoA7foI2uDswsm5wa9CxacPmaEI" Subject: Re: [PHP-DEV] Is OpCache enabled by default in php 5.5 and later or not? From: rasmus@lerdorf.com (Rasmus Lerdorf) --thK2iAvoA7foI2uDswsm5wa9CxacPmaEI Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/05/2015 08:12 AM, j adams wrote: > I don't know if this is a question for the documentation team or not, b= ut > figured I'd start here. There does not appear to be any definitive, cle= ar, > reliable information on PHP's op caching functionality in recent 5.* > versions and this problem needs to be remedied. >=20 > Question 1: Is OpCache enabled by default in php 5.5 and later or not? >=20 > This page: > http://php.net/manual/en/intro.opcache.php > says "This extension is bundled with PHP 5.5.0 and later, and is =C2=BB= > available in PECL for PHP versions 5.2, 5.3 and 5.4." >=20 > But this page: > http://php.net/manual/en/opcache.installation.php > says "PHP 5.5.0 and later >=20 > OPcache can only be compiled as a shared extension. If you have disable= d > the building of default extensions with --disable-all , you must compil= e > PHP with the --enable-opcache option for OPcache to be available. >=20 > Once compiled, you can use the zend_extension configuration directive t= o > load the OPcache extension into PHP. This can be done with > zend_extension=3D/full/path/to/opcache.so on non-Windows platforms, and= > zend_extension=3DC:\path\to\php_opcache.dll on Windows." >=20 >=20 >=20 > Question 2: > If OpCache is enabled, does it require any php.ini settings or not? Doe= s it > show any functions or constants or phpinfo() that will reveal its > existence? I've got php 5.6.6 installed on CentOS 7 and I can find nei= ther > hide nor hair of it. There is, however, an opcache package one can ins= tall > (php56u-opcache.x86_64 in my case). >=20 >=20 >=20 > Question 3: > What about Zend Optimizer? Still other articles say it has been integra= ted > into php 5.5 and later, but this mythical beast also makes no sign to > indicate its inclusion either. Some articles: > https://wiki.php.net/rfc/optimizerplus > https://wordpress.org/support/topic/looking-ahead-to-php-55-zend-optimi= zer-the-end-of-apc > http://www.internetnews.com/blog/skerner/php-5-5-to-include-open-source= -zend-optimizer-.html Opcache is bundled with PHP as of PHP 5.5, but distros like to unbundle things and provide them as separate packages. We can't do much about that and it is also hard to document all the variations distros come up with. So yes, in your case you need to install the opcache package. Presumably the way Centos has created the rpm it will add the appropriate magic ini settings and you will see opcache listed in your phpinfo() output after installing that package. And ZendOptimizer is the same as Opcache in this context. -Rasmus --thK2iAvoA7foI2uDswsm5wa9CxacPmaEI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlT4hPwACgkQlxayKTuqOuBS/QCeIIhbY0i6X7D9Q8OI0K3CY3Ox htgAn1cwCjbPa+Lb+6+vcEhHhrQbuwCJ =ciJw -----END PGP SIGNATURE----- --thK2iAvoA7foI2uDswsm5wa9CxacPmaEI--