mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-17 09:28:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@332519 c90b9560-bf6c-de11-be94-00142212c4b1
114 lines
3.1 KiB
XML
114 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<sect1 xml:id="opcache.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
&reftitle.install;
|
|
|
|
<para>
|
|
The process of installing OPcache varies depending on which version of PHP
|
|
you're running. Please refer to the appropriate section below.
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
If you want to use OPcache with
|
|
<link xlink:href="&url.xdebug;">Xdebug</link>, you must load OPcache before
|
|
Xdebug.
|
|
</para>
|
|
</note>
|
|
|
|
<sect2 xml:id="opcache.installation.bundled">
|
|
<title>PHP 5.5.0 and later</title>
|
|
|
|
<para>
|
|
OPcache can only be compiled as a shared extension. If you have
|
|
disabled the building of default extensions with
|
|
<option role="configure">--disable-all</option>, you must compile PHP with
|
|
the <option role="configure">--enable-opcache</option> option for OPcache
|
|
to be available.
|
|
</para>
|
|
|
|
<para>
|
|
Once compiled, you can use the
|
|
<link linkend="ini.zend-extension">zend_extension</link> configuration
|
|
directive to load the OPcache extension into PHP. This can be done with
|
|
<literal>zend_extension=/full/path/to/opcache.so</literal> on non-Windows
|
|
platforms, and <literal>zend_extension=C:\path\to\php_opcache.dll</literal>
|
|
on Windows.
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="opcache.installation.pecl">
|
|
<title>PHP 5.2, 5.3 and 5.4</title>
|
|
|
|
<para>
|
|
&pecl.moved;
|
|
</para>
|
|
|
|
<para>
|
|
&pecl.info;
|
|
<link xlink:href="&url.pecl.package;ZendOpcache">&url.pecl.package;ZendOpcache</link>.
|
|
</para>
|
|
|
|
<para>
|
|
&pecl.windows.download;
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="opcache.installation.recommended">
|
|
<title>Recommended php.ini settings</title>
|
|
|
|
<para>
|
|
The following settings are generally recommended as providing good
|
|
performance:
|
|
</para>
|
|
|
|
<informalexample>
|
|
<programlisting>
|
|
<![CDATA[
|
|
opcache.memory_consumption=128
|
|
opcache.interned_strings_buffer=8
|
|
opcache.max_accelerated_files=4000
|
|
opcache.revalidate_freq=60
|
|
opcache.fast_shutdown=1
|
|
opcache.enable_cli=1
|
|
]]>
|
|
</programlisting>
|
|
</informalexample>
|
|
|
|
<para>
|
|
You may also want to consider disabling
|
|
<link linkend="ini.opcache.save-comments">opcache.save_comments</link>
|
|
and enabling
|
|
<link linkend="ini.opcache.enable-file-override">opcache.enable_file_override</link>,
|
|
however note that you will have to test your code before using these in
|
|
production as they are known to break some frameworks and applications,
|
|
particularly in cases where documentation comment annotations are used.
|
|
</para>
|
|
|
|
<para>
|
|
A full list of configuration directives supported by OPcache
|
|
<link linkend="opcache.configuration">is also available</link>.
|
|
</para>
|
|
</sect2>
|
|
</sect1>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|