Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 11069

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Runtime Configuration</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="opcache.installation.html">Installation</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="opcache.resources.html">Resource Types</a></div>
 <div class="up"><a href="opcache.setup.html">Installing/Configuring</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="opcache.configuration" class="sect1">
 <h2 class="title">Runtime Configuration</h2>
 <p class="simpara">
The behaviour of these functions is affected by settings in <var class="filename">php.ini</var>.
</p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>OPcache configuration options</strong></caption>
   
    <thead>
     <tr>
      <th>Name</th>
      <th>Default</th>
      <th>Changeable</th>
      <th>Changelog</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.enable" class="link">opcache.enable</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.enable-cli" class="link">opcache.enable_cli</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.memory-consumption" class="link">opcache.memory_consumption</a></td>
      <td>&quot;128&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Before PHP 7.0.0 the default was &quot;64&quot;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.interned-strings-buffer" class="link">opcache.interned_strings_buffer</a></td>
      <td>&quot;8&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Before PHP 7.0.0 the default was &quot;4&quot;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.max-accelerated-files" class="link">opcache.max_accelerated_files</a></td>
      <td>&quot;10000&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Before PHP 7.0.0 the default was &quot;2000&quot;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.max-wasted-percentage" class="link">opcache.max_wasted_percentage</a></td>
      <td>&quot;5&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.use-cwd" class="link">opcache.use_cwd</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.validate-timestamps" class="link">opcache.validate_timestamps</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.revalidate-freq" class="link">opcache.revalidate_freq</a></td>
      <td>&quot;2&quot;</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.revalidate-path" class="link">opcache.revalidate_path</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.save-comments" class="link">opcache.save_comments</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.load-comments" class="link">opcache.load_comments</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_ALL</td>
      <td>Removed in PHP 7.0.0.</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.fast-shutdown" class="link">opcache.fast_shutdown</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Removed in PHP 7.2.0</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.enable-file-override" class="link">opcache.enable_file_override</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.optimization-level" class="link">opcache.optimization_level</a></td>
      <td>&quot;0x7FFFBFFF&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Changed from 0xFFFFBFFF in PHP 5.6.18</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.inherited-hack" class="link">opcache.inherited_hack</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Removed in PHP 7.3.0</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.dups-fix" class="link">opcache.dups_fix</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.blacklist-filename" class="link">opcache.blacklist_filename</a></td>
      <td>&quot;&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.max-file-size" class="link">opcache.max_file_size</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.consistency-checks" class="link">opcache.consistency_checks</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.force-restart-timeout" class="link">opcache.force_restart_timeout</a></td>
      <td>&quot;180&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.error-log" class="link">opcache.error_log</a></td>
      <td>&quot;&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.log-verbosity-level" class="link">opcache.log_verbosity_level</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.preferred-memory-model" class="link">opcache.preferred_memory_model</a></td>
      <td>&quot;&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.protect-memory" class="link">opcache.protect_memory</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.mmap-base" class="link">opcache.mmap_base</a></td>
      <td><strong><code>NULL</code></strong></td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.restrict-api" class="link">opcache.restrict_api</a></td>
      <td>&quot;&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.file_update_protection" class="link">opcache.file_update_protection</a></td>
      <td>&quot;2&quot;</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.huge_code_pages" class="link">opcache.huge_code_pages</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.lockfile_path" class="link">opcache.lockfile_path</a></td>
      <td>&quot;/tmp&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.opt_debug_level" class="link">opcache.opt_debug_level</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.file-cache" class="link">opcache.file_cache</a></td>
      <td>NULL</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available as of PHP 7.0.0</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.file-cache-only" class="link">opcache.file_cache_only</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available as of PHP 7.0.0</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.file-cache-consistency-checks" class="link">opcache.file_cache_consistency_checks</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available as of PHP 7.0.0</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.file-cache-fallback" class="link">opcache.file_cache_fallback</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available as of PHP 7.0.0</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.validate-permission" class="link">opcache.validate_permission</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available as of PHP 7.0.14</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.html#ini.opcache.validate-root" class="link">opcache.validate_root</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available as of PHP 7.0.14</td>
     </tr>

    </tbody>
   
  </table>

  For further details and definitions of the
PHP_INI_* modes, see the <a href="configuration.changes.modes.html" class="xref">Where a configuration setting may be set</a>.
 </p>
 
 <p class="para">Here&#039;s a short explanation of
the configuration directives.</p>
 
 <p class="para">
  <dl>

   
    <dt id="ini.opcache.enable">
     <code class="parameter">opcache.enable</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      Enables the opcode cache. When disabled, code is not optimised or 
      cached. The setting <em>opcache.enable</em> can not be
      enabled at runtime through <span class="function"><a href="function.ini-set.html" class="function">ini_set()</a></span>, it can only
      be disabled. Trying to enable it at in a script will generate a warning.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.enable-cli">
     <code class="parameter">opcache.enable_cli</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      Enables the opcode cache for the CLI version of PHP.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.memory-consumption">
     <code class="parameter">opcache.memory_consumption</code>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <p class="para">
      The size of the shared memory storage used by OPcache, in megabytes.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.interned-strings-buffer">
     <code class="parameter">opcache.interned_strings_buffer</code>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <p class="para">
      The amount of memory used to store interned strings, in megabytes. This
      configuration directive is ignored in PHP &lt; 5.3.0.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.max-accelerated-files">
     <code class="parameter">opcache.max_accelerated_files</code>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <p class="para">
      The maximum number of keys (and therefore scripts) in the OPcache hash
      table. The actual value used will be the first number in the set of
      prime numbers
      <em>{ 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987 }</em>
      that is greater than or equal to the configured value. The minimum value is 200. The maximum
      value is 100000 in PHP &lt; 5.5.6, and 1000000 in later versions.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.max-wasted-percentage">
     <code class="parameter">opcache.max_wasted_percentage</code>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <p class="para">
      The maximum percentage of wasted memory that is allowed before a restart
      is scheduled.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.use-cwd">
     <code class="parameter">opcache.use_cwd</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      If enabled, OPcache appends the current working directory to the script
      key, thereby eliminating possible collisions between files with the same
      base name. Disabling this directive improves performance, but may break
      existing applications.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.validate-timestamps">
     <code class="parameter">opcache.validate_timestamps</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      If enabled, OPcache will check for updated scripts every
      <a href="opcache.configuration.html#ini.opcache.revalidate-freq" class="link">opcache.revalidate_freq</a>
      seconds. When this directive is disabled, you must reset OPcache
      manually via <span class="function"><a href="function.opcache-reset.html" class="function">opcache_reset()</a></span>,
      <span class="function"><a href="function.opcache-invalidate.html" class="function">opcache_invalidate()</a></span> or by restarting the Web server
      for changes to the filesystem to take effect.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.revalidate-freq">
     <code class="parameter">opcache.revalidate_freq</code>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <p class="para">
      How often to check script timestamps for updates, in seconds.
      <em>0</em> will result in OPcache checking for updates on
      every request.
     </p>
     <p class="para">
      This configuration directive is ignored if
      <a href="opcache.configuration.html#ini.opcache.validate-timestamps" class="link">opcache.validate_timestamps</a>
      is disabled.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.revalidate-path">
     <code class="parameter">opcache.revalidate_path</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      If disabled, existing cached files using the same
      <a href="ini.core.html#ini.include-path" class="link">include_path</a> will be reused.
      Thus, if a file with the same name is elsewhere in the include_path, it
      won&#039;t be found.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.save-comments">
     <code class="parameter">opcache.save_comments</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      If disabled, all documentation comments will be discarded from the
      opcode cache to reduce the size of the optimised code. Disabling this
      configuration directive may break applications and frameworks that rely
      on comment parsing for annotations, including Doctrine, Zend Framework 2
      and PHPUnit.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.load-comments">
     <code class="parameter">opcache.load_comments</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      If disabled, documentation comments won&#039;t be loaded from the opcode
      cache even if they exist. This can be used with
      <a href="opcache.configuration.html#ini.opcache.save-comments" class="link">opcache.save_comments</a>
      to only load comments for applications that require them.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.fast-shutdown">
     <code class="parameter">opcache.fast_shutdown</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      If enabled, a fast shutdown sequence is used that doesn&#039;t free each
      allocated block, but relies on the Zend Engine memory manager to
      deallocate the entire set of request variables en masse.
     </p>
     <p class="para">
      This directive has been removed in PHP 7.2.0. A variant of the fast
      shutdown sequence has been integrated into PHP and will be automatically
      used if possible.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.enable-file-override">
     <code class="parameter">opcache.enable_file_override</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      When enabled, the opcode cache will be checked for whether a file has
      already been cached when <span class="function"><a href="function.file-exists.html" class="function">file_exists()</a></span>,
      <span class="function"><a href="function.is-file.html" class="function">is_file()</a></span> and <span class="function"><a href="function.is-readable.html" class="function">is_readable()</a></span> are
      called. This may increase performance in applications that check the
      existence and readability of PHP scripts, but risks returning stale data
      if 
      <a href="opcache.configuration.html#ini.opcache.validate-timestamps" class="link">opcache.validate_timestamps</a>
      is disabled.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.optimization-level">
     <code class="parameter">opcache.optimization_level</code>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <p class="para">
      A bitmask that controls which optimisation passes are executed.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.inherited-hack">
     <code class="parameter">opcache.inherited_hack</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      In PHP &lt; 5.3, OPcache stores the places where
      <a href="internals2.opcodes.declare-class.html" class="link">DECLARE_CLASS</a>
      opcodes used inheritance; when the file is loaded, OPcache then tries to
      bind the inherited classes using the current environment. The problem is
      that while the DECLARE_CLASS opcode may not be needed for the current
      script, if the script requires that the opcode be defined, it may not
      run.
     </p>
     <p class="para">
      This configuration directive is ignored in PHP 5.3 and later.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.dups-fix">
     <code class="parameter">opcache.dups_fix</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      This hack should only be enabled to work around &quot;Cannot redeclare class&quot;
      errors.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.blacklist-filename">
     <code class="parameter">opcache.blacklist_filename</code>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <p class="para">
      The location of the OPcache blacklist file. A blacklist file is a text
      file containing the names of files that should not be accelerated, one
      per line. Wildcards are allowed, and prefixes can also be provided.
      Lines starting with a semi-colon are ignored as comments.
     </p>
     <p class="para">
      A simple blacklist file might look as follows:
     </p>
     <div class="informalexample">
      <div class="example-contents">
<div class="cdata"><pre>
; Matches a specific file.
/var/www/broken.php
; A prefix that matches all files starting with x.
/var/www/x
; A wildcard match.
/var/www/*-broken.php
</pre></div>
      </div>

     </div>
    </dd>

   
   
    <dt id="ini.opcache.max-file-size">
     <code class="parameter">opcache.max_file_size</code>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <p class="para">
      The maximum file size that will be cached, in bytes. If this is
      <em>0</em>, all files will be cached.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.consistency-checks">
     <code class="parameter">opcache.consistency_checks</code>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <p class="para">
      If non-zero, OPcache will verify the cache checksum every N requests,
      where N is the value of this configuration directive. This should only
      be enabled when debugging, as it will impair performance.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.force-restart-timeout">
     <code class="parameter">opcache.force_restart_timeout</code>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <p class="para">
      The length of time to wait for a scheduled restart to begin if the cache
      isn&#039;t active, in seconds. If the timeout is hit, then OPcache assumes
      that something is wrong and will kill the processes holding locks on the
      cache to permit a restart.
     </p>
     <p class="para">
      If
      <a href="opcache.configuration.html#ini.opcache.log-verbosity-level" class="link">opcache.log_verbosity_level</a>
      is set to 2 or above, a warning will be recorded in the error log when
      this occurs.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.error-log">
     <code class="parameter">opcache.error_log</code>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <p class="para">
      The error log for OPcache errors. An empty string is treated the same as
      <em>stderr</em>, and will result in logs being sent to
      standard error (which will be the Web server error log in most cases).
     </p>
    </dd>

   
   
    <dt id="ini.opcache.log-verbosity-level">
     <code class="parameter">opcache.log_verbosity_level</code>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </dt>

    <dd>

     <p class="para">
      The log verbosity level. By default, only fatal errors (level 0) and
      errors (level 1) are logged. Other levels available are warnings (level
      2), information messages (level 3) and debug messages (level 4).
     </p>
    </dd>

   
   
    <dt id="ini.opcache.preferred-memory-model">
     <code class="parameter">opcache.preferred_memory_model</code>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <p class="para">
      The preferred memory model for OPcache to use. If left empty, OPcache
      will choose the most appropriate model, which is the correct behaviour
      in virtually all cases.
     </p>
     <p class="para">
      Possible values include <em>mmap</em>, <em>shm</em>,
      <em>posix</em> and <em>win32</em>.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.protect-memory">
     <code class="parameter">opcache.protect_memory</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      Protects shared memory from unexpected writes while executing scripts.
      This is useful for internal debugging only.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.mmap-base">
     <code class="parameter">opcache.mmap_base</code>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <p class="para">
      The base used for shared memory segments on Windows. All PHP processes
      have to map shared memory into the same address space. Using this
      directive allows &quot;Unable to reattach to base address&quot; errors to be
      fixed.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.restrict-api">
     <code class="parameter">opcache.restrict_api</code>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <p class="para">
      Allows calling OPcache API functions only from PHP scripts which path
      is started from specified string. The default &quot;&quot; means no restriction.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.file_update_protection">
     <code class="parameter">opcache.file_update_protection</code>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <p class="para">
      Prevents caching files that are less than this number of seconds old.
      It protects from caching of incompletely updated files. In case all file
      updates on your site are atomic, you may increase performance by setting it to &quot;0&quot;.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.huge_code_pages">
     <code class="parameter">opcache.huge_code_pages</code>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <p class="para">
      Enables or disables copying of PHP code (text segment) into HUGE PAGES.
      This should improve performance, but requires appropriate OS configuration.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.lockfile_path">
     <code class="parameter">opcache.lockfile_path</code>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <p class="para">
      Absolute path used to store shared lockfiles (for *nix only)
     </p>
    </dd>

   
   
    <dt id="ini.opcache.opt_debug_level">
     <code class="parameter">opcache.opt_debug_level</code>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <p class="para">
      Produces opcode dumps for debugging different stages of optimizations.
      0x10000 will output opcodes as the compiler produced them before any optimization occurs 
      while 0x20000 will output optimized codes.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.file-cache">
     <code class="parameter">opcache.file_cache</code>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </dt>

    <dd>

     <p class="para">
      Enables and sets the second level cache directory. It should improve
      performance when SHM memory is full, at server restart or SHM reset. The
      default &quot;&quot; disables file based caching.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.file-cache-only">
     <code class="parameter">opcache.file_cache_only</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      Enables or disables opcode caching in shared memory.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.file-cache-consistency-checks">
     <code class="parameter">opcache.file_cache_consistency_checks</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      Enables or disables checksum validation when script loaded from file cache.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.file-cache-fallback">
     <code class="parameter">opcache.file_cache_fallback</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      Implies opcache.file_cache_only=1 for a certain process that failed to
      reattach to the shared memory (for Windows only). Explicitly enabled file
      cache is required.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.validate-permission">
     <code class="parameter">opcache.validate_permission</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      Validates the cached file permissions against the current user.
     </p>
    </dd>

   
   
    <dt id="ini.opcache.validate-root">
     <code class="parameter">opcache.validate_root</code>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </dt>

    <dd>

     <p class="para">
      Prevents name collisions in chroot&#039;ed environments. This should be enabled in
      all chroot&#039;ed environments to prevent access to files outside the chroot.
     </p>
    </dd>

   
  </dl>

 </p>
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="opcache.installation.html">Installation</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="opcache.resources.html">Resource Types</a></div>
 <div class="up"><a href="opcache.setup.html">Installing/Configuring</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>