Files
doc-fr/reference/opcache/configure.xml
2020-11-08 19:57:57 +00:00

99 lines
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 49328c2160a74fb546b5dade766d6c8d70fa1ab1 Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->
<sect1 xml:id="opcache.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.install;
<para>
OPcache peut seulement être compilé comme une extension partagé.
Si vous avez désactivé la compilation des extensions par défaut avec
<option role="configure">--disable-all</option>, vous devez compiler PHP avec
l'option <option role="configure">--enable-opcache</option> pour que OPcache
soit disponible.
</para>
<para>
Une fois compilé, vous pouvez utiliser la directive de configuration
<link linkend="ini.zend-extension">zend_extension</link> pour chargez
l'extension OPcache dans PHP. Ceci peut être réaliser avec
<literal>zend_extension=/full/path/to/opcache.so</literal> sur les plateformes
non-Windows, et<literal>zend_extension=C:\path\to\php_opcache.dll</literal>
sur Windows.
</para>
<note>
<para>
Si vous voulez utiliser OPcache avec
<link xlink:href="&url.xdebug;">Xdebug</link>, vous devez charger
OPcache avant Xdebug.
</para>
</note>
<sect2 xml:id="opcache.installation.recommended">
<title>Configuration php.ini recommandée</title>
<para>
La configuration suivante est généralement recommandée, vu qu'elle
fournit un bon gain en terme de 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>
Vous pourriez également vouloir désactiver
<link linkend="ini.opcache.save-comments">opcache.save_comments</link>
et activer
<link linkend="ini.opcache.enable-file-override">opcache.enable_file_override</link>,
cependant, notez que vous devez tester votre code avant de l'utiliser en
production, sachant qu'il peut casser des frameworks et des applications,
en particulier dans le cas où les annotations des commentaires
de documentations sont utilisées.
</para>
<para>
Sur Windows, <link linkend="ini.opcache.file-cache-fallback">opcache.file_cache_fallback</link>
devrait être activé, et <link linkend="ini.opcache.file-cache">opcache.file_cache</link>
devrait être définie à un dossier écrivable déjà existant.
</para>
<para>
Une liste complète de directives de configuration supportées par OPcache
<link linkend="opcache.configuration">est également disponible</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
-->