Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 105

php-manual-en-5.5.7-1.mga4.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="apc.installation.html">Installation</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="apc.resources.html">Resource Types</a></div>
 <div class="up"><a href="apc.setup.html">Installing/Configuring</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="apc.configuration" class="section">
 <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">
  Although the default APC settings are fine for many installations, serious
  users should consider tuning the following parameters.
 </p>
 <p class="para">
  There are two primary decisions to be made configuring APC.  First,
  how much memory is going to be allocated to APC; and second, whether APC
  will check if a file has been modified on every request.  The two ini 
  directives that control these settings are <em>apc.shm_size</em>
  and <em>apc.stat</em>, respectively.  Read the sections on these
  two directive carefully below.
 </p>
 <p class="para">
  Once the server is running, the <em>apc.php</em> script that
  is bundled with the extension should be copied somewhere into the docroot and
  viewed with a browser as it provides a detailed analysis of the internal 
  workings of APC.  If GD is enabled in PHP, it will even display some
  interesting graphs.  The first thing to ensure, of course, is that it is
  actually caching files.  If APC is working, the <em>Cache full count
  </em> number (on the left) will display the number of times the cache
  has reached maximum capacity and has had to forcefully clean any entries that
  haven&#039;t been accessed in the last <em>apc.ttl</em> seconds. This
  number is minimized in a well-configured cache.  If the cache is constantly
  being filled, and thusly forcefully freed, the resulting churning will have
  disparaging effects on script performance.  The easiest way to minimize this 
  number is to allocate more memory for APC.  Barring that, the <em>apc.filters
  </em> ought to be used to cache fewer scripts.
 </p>
 <p class="para">
  When APC is compiled with mmap support (Memory Mapping), it will use only one 
  memory segment, unlike when APC is built with SHM (SysV Shared Memory) support 
  that uses multiple memory segments. MMAP does not have a maximum limit like SHM 
  does in <em>/proc/sys/kernel/shmmax</em>. In general MMAP support is 
  recommeded because it will reclaim the memory faster when the webserver is 
  restarted and all in all reduces memory allocation impact at startup.
 </p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>APC 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="apc.configuration.html#ini.apc.enabled" class="link">apc.enabled</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>PHP_INI_SYSTEM in APC 2. PHP_INI_ALL in APC &lt;= 3.0.12.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.shm-segments" class="link">apc.shm_segments</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.shm-size" class="link">apc.shm_size</a></td>
      <td>&quot;32M&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.shm-strings-buffer" class="link">apc.shm_strings_buffer</a></td>
      <td>&quot;4M&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.1.4.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.optimization" class="link">apc.optimization</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_ALL</td>
      <td>PHP_INI_SYSTEM in APC 2. Removed in APC 3.0.13.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.num-files-hint" class="link">apc.num_files_hint</a></td>
      <td>&quot;1000&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.user-entries-hint" class="link">apc.user_entries_hint</a></td>
      <td>&quot;4096&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.0.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.ttl" class="link">apc.ttl</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.0.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.user-ttl" class="link">apc.user_ttl</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.0.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.gc-ttl" class="link">apc.gc_ttl</a></td>
      <td>&quot;3600&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.cache-by-default" class="link">apc.cache_by_default</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_ALL</td>
      <td>PHP_INI_SYSTEM in APC &lt;= 3.0.12. Available since APC 3.0.0.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.filters" class="link">apc.filters</a></td>
      <td>NULL</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.mmap-file-mask" class="link">apc.mmap_file_mask</a></td>
      <td>NULL</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.slam-defense" class="link">apc.slam_defense</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.0. Prior to APC 3.1.4, the default value was <em>&quot;0&quot;</em> (disabled).</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.file-update-protection" class="link">apc.file_update_protection</a></td>
      <td>&quot;2&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.6.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.enable-cli" class="link">apc.enable_cli</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.7.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.max-file-size" class="link">apc.max_file_size</a></td>
      <td>&quot;1M&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.7.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.use-request-time" class="link">apc.use_request_time</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_ALL</td>
      <td>Available since APC 3.1.3.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.stat" class="link">apc.stat</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.10.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.write-lock" class="link">apc.write_lock</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.11.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.report-autofilter" class="link">apc.report_autofilter</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.11.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.serializer" class="link">apc.serializer</a></td>
      <td>&quot;default&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.1.0.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.include-once-override" class="link">apc.include_once_override</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.12.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.rfc1867" class="link">apc.rfc1867</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.13.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.rfc1867-prefix" class="link">apc.rfc1867_prefix</a></td>
      <td>&quot;upload_&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.rfc1867-name" class="link">apc.rfc1867_name</a></td>
      <td>&quot;APC_UPLOAD_PROGRESS&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.rfc1867-freq" class="link">apc.rfc1867_freq</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.rfc1867-ttl" class="link">apc.rfc1867_ttl</a></td>
      <td>&quot;3600&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.1.1.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.localcache" class="link">apc.localcache</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available in APC 3.0.14 - 3.1.11.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.localcache.size" class="link">apc.localcache.size</a></td>
      <td>&quot;512&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>vailable in APC 3.0.14 - 3.1.11.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.coredump-unmap" class="link">apc.coredump_unmap</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.16.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.stat-ctime" class="link">apc.stat_ctime</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.0.13.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.preload-path" class="link">apc.preload_path</a></td>
      <td>NULL</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.1.1.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.file-md5" class="link">apc.file_md5</a></td>
      <td>&quot;0&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.1.1.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.canonicalize" class="link">apc.canonicalize</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.1.1.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.lazy-functions" class="link">apc.lazy_functions</a></td>
      <td>0</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.1.3.</td>
     </tr>

     <tr>
      <td><a href="apc.configuration.html#ini.apc.lazy-classes" class="link">apc.lazy_classes</a></td>
      <td>0</td>
      <td>PHP_INI_SYSTEM</td>
      <td>Available since APC 3.1.3.</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.apc.enabled">
    <span class="term">
     <em><code class="parameter">apc.enabled</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </span>
    <dd>

     <p class="para">
      <em>apc.enabled</em> can be set to 0 to disable APC. This is
      primarily useful when APC is statically compiled
      into PHP, since there is no other way to disable
      it (when compiled as a DSO, the <em>extension</em>
      line in <em>php.ini</em> can just be commented-out).
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.shm-segments">
    <span class="term">
     <em><code class="parameter">apc.shm_segments</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      The number of shared memory segments to allocate
      for the compiler cache. If APC is running out of
      shared memory but <em>apc.shm_size</em> 
      is set as high as the system allows, raising
      this value might prevent APC from exhausting its memory.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.shm-size">
    <span class="term">
     <em><code class="parameter">apc.shm_size</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      The size of each shared memory segment in MB.
      By default, some systems (including most BSD
      variants) have very low limits on the size of a
      shared memory segment.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.shm-strings-buffer">
    <span class="term">
     <em><code class="parameter">apc.shm_strings_buffer</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </span>
    <dd>

     <p class="para">
      The size of memory to use as a shared buffer for strings used internally
      by APC. Size Should be suffixed by M for megabytes, G for gigabytes.
      Enabling this option will reduce the amount of memory used per PHP-FPM
      worker as strings will be stored once rather than for each worker.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.optimization">
    <span class="term">
     <em><code class="parameter">apc.optimization</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      The optimization level. Zero disables the
      optimizer, and higher values use more aggressive
      optimizations. Expect very modest speed
      improvements. This is experimental.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.num-files-hint">
    <span class="term">
     <em><code class="parameter">apc.num_files_hint</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      A &quot;hint&quot; about the number of distinct source files
      that will be included or requested on your web
      server. Set to zero or omit if unsure;
      this setting is mainly useful for sites that have
      many thousands of source files.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.user-entries-hint">
    <span class="term">
     <em><code class="parameter">apc.user_entries_hint</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      Just like <a href="apc.configuration.html#ini.apc.num-files-hint" class="link">apc.num_files_hint</a>,
      a &quot;hint&quot; about the number of distinct user cache variables to store.
      Set to zero or omit if not sure.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.ttl">
    <span class="term">
     <em><code class="parameter">apc.ttl</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      The number of seconds a cache entry is allowed to
      idle in a slot in case this cache entry slot is
      needed by another entry.  Leaving this at zero
      means that APC&#039;s cache could potentially fill up
      with stale entries while newer entries won&#039;t be
      cached.  In the event of a cache running out of
      available memory, the cache will be completely
      expunged if ttl is equal to 0.  Otherwise, if the
      ttl is greater than 0, APC will attempt to remove
      expired entries.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.user-ttl">
    <span class="term">
     <em><code class="parameter">apc.user_ttl</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      The number of seconds a cache entry is allowed to
      idle in a slot in case this cache entry slot is
      needed by another entry.  Leaving this at zero
      means that APC&#039;s cache could potentially fill up
      with stale entries while newer entries won&#039;t be
      cached.  In the event of a cache running out of
      available memory, the cache will be completely
      expunged if ttl is equal to 0.  Otherwise, if the
      ttl is greater than 0, APC will attempt to remove
      expired entries.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.gc-ttl">
    <span class="term">
     <em><code class="parameter">apc.gc_ttl</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      The number of seconds that a cache entry may
      remain on the garbage-collection list. This value
      provides a fail-safe in the event that a server
      process dies while executing a cached source file;
      if that source file is modified, the memory
      allocated for the old version will not be
      reclaimed until this TTL reached. Set to zero to
      disable this feature.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.cache-by-default">
    <span class="term">
     <em><code class="parameter">apc.cache_by_default</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </span>
    <dd>

     <p class="para">
      On by default, but can be set to off and used in
      conjunction with positive <em>apc.filters</em> so that files
      are only cached if matched by a positive filter.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.filters">
    <span class="term">
     <em><code class="parameter">apc.filters</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </span>
    <dd>

     <p class="para">
      A comma-separated list of POSIX extended regular
      expressions. If any pattern matches the source
      filename, the file will not be cached. Note that
      the filename used for matching is the one passed
      to include/require, not the absolute path.  If the
      first character of the expression is a <em>+</em> then the
      expression will be additive in the sense that any
      files matched by the expression will be cached, and
      if the first character is a <em>-</em> then anything matched
      will not be cached.  The <em>-</em> case is the default, so
      it can be left off.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.mmap-file-mask">
    <span class="term">
     <em><code class="parameter">apc.mmap_file_mask</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </span>
    <dd>

     <p class="para">
      If compiled with MMAP support by using <em>--enable-mmap</em>
      this is the mktemp-style file_mask to pass to the
      mmap module for determining whether your mmap&#039;ed memory
      region is going to be file-backed or shared memory
      backed.  For straight file-backed mmap, set it to
      something like <em>/tmp/apc.XXXXXX</em>
      (exactly 6 <em>X</em>s).
      To use POSIX-style shm_open/mmap put a <em>.shm</em>
      somewhere in your mask.  e.g. <em>/apc.shm.XXXXXX</em>
      You can also set it to <em>/dev/zero</em> to use your
      kernel&#039;s <em>/dev/zero</em> interface to anonymous mmap&#039;ed
      memory. Leaving it undefined will force an anonymous mmap.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.slam-defense">
    <span class="term">
     <em><code class="parameter">apc.slam_defense</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      On very busy servers whenever you start the server or
      modify files you can create a race of many processes
      all trying to cache the same file at the same time.
      This option sets the percentage of processes that will
      skip trying to cache an uncached file.  Or think of it
      as the probability of a single process to skip caching.
      For example, setting <em>apc.slam_defense</em>
      to <em>75</em> would mean that there is
      a 75% chance that the process will not cache an uncached
      file. So, the higher the setting the greater the defense
      against cache slams.  Setting this to <em>0</em>
      disables this feature.
     </p>
     <p class="para">
      Deprecated by <a href="apc.configuration.html#ini.apc.write-lock" class="link">apc.write_lock</a>.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.file-update-protection">
    <span class="term">
     <em><code class="parameter">apc.file_update_protection</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      When a file is modified on a live web server it really
      ought to be done in an atomic manner.  That is, written to a
      temporary file and renamed (<em>mv</em>) the file into its
      permanent position when it is ready.  Many text editors,
      <strong class="command">cp</strong>, <strong class="command">tar</strong> and
      other such programs don&#039;t do this.  This means that there
      is a chance that a file is accessed (and cached) while it
      is still being written to.  This <em>apc.file_update_protection</em>
      setting puts a delay on caching brand new files.  The
      default is 2 seconds, which means that if the modification
      timestamp (<em>mtime</em>) on a file shows that it is less than 2
      seconds old when it is accessed, it will not be cached.
      The unfortunate person who accessed this half-written file
      will still see weirdness, but at least it won&#039;t persist.
      If all of the webserver&#039;s files are atomically updated, via
      some method like <strong class="command">rsync</strong> (which updates correctly),
      this protection can be disabled by setting this directive to 0.
      If the system is flooded with i/o and some update procedures
      are taking longer than 2 seconds, this setting should be increased
      to enable the protection on those slower update operations.
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.enable-cli">
    <span class="term">
     <em><code class="parameter">apc.enable_cli</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      Mostly for testing and debugging.  Setting this enables APC
      for the CLI version of PHP.  Under normal circumstances, it is
      not ideal to create, populate and destroy the APC cache on every
      CLI request, but for various test scenarios it is useful to be
      able to enable APC for the CLI version of PHP easily.
     </p>
    </dd>

   </dt>

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

     <p class="para">
      Prevent files larger than this value from getting cached.  Defaults to
      1M. 
     </p>
    </dd>

   </dt>

   <dt id="ini.apc.stat">
    <span class="term">
     <em><code class="parameter">apc.stat</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      Be careful changing this setting.  This defaults to on, forcing APC to
      stat (check) the script on each request to determine if it has been modified.
      If it has been modified it will recompile and cache the new version.  
      If this setting is off, APC will not check, which usually means that to 
      force APC to recheck files, the web server will have to be restarted or the 
      cache will have to be manually cleared.  Note that FastCGI web server configurations
      may not clear the cache on restart.  On a production server where the 
      script files rarely change, a significant performance boost can be 
      achieved by disabled stats.
     </p>
     <p class="para">
      For included/required files this option applies as well, but note that
      for relative path includes (any path that doesn&#039;t start
      with / on Unix) APC has to check in order to uniquely identify the file.
      If you use absolute path includes APC can skip the stat and use that
      absolute path as the unique identifier for the file.
     </p>
    </dd>

   </dt>

   
   <dt id="ini.apc.write-lock">
    <span class="term">
     <em><code class="parameter">apc.write_lock</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </span>
    <dd>

     <p class="para">
      On busy servers, when the web server is first started, or when many files
      have been modified at the same time, APC may try to compile and cache the 
      same file multiple times.  Write_lock guarantees that only one process
      will attempt to compile and cache an uncached script.  The other processes 
      attempting to use the script will run without using the opcode cache, rather
      than locking and waiting for the cache to prime.
     </p>
    </dd>

   </dt>

   
   <dt id="ini.apc.report-autofilter">
    <span class="term">
     <em><code class="parameter">apc.report_autofilter</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </span>
    <dd>

     <p class="para">
      Logs any scripts that were automatically excluded from being cached due
      to early/late binding issues.
     </p>
    </dd>

   </dt>

   
   <dt id="ini.apc.serializer">
    <span class="term">
     <em><code class="parameter">apc.serializer</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </span>
    <dd>

     <p class="para">
      Used to configure APC to use a third party serializer.
     </p>
    </dd>

   </dt>

   
   <dt id="ini.apc.include-once-override">
    <span class="term">
     <em><code class="parameter">apc.include_once_override</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </span>
    <dd>

     <p class="para">
      Optimize  <span class="function"><a href="function.include-once.html" class="function">include_once</a></span> and  <span class="function"><a href="function.require-once.html" class="function">require_once</a></span>
      calls and avoid the expensive system calls used.
     </p>
     <div class="warning"><strong class="warning">Warning</strong>
      <p class="simpara">
       This feature is <em class="emphasis">EXPERIMENTAL</em>. The behaviour of this
       directive, its name, and surrounding documentation may change without
       notice in a future release of APC. This feature should be used at your
       own risk.
      </p>
     </div>
    </dd>

   </dt>

   
   <dt id="ini.apc.rfc1867">
    <span class="term">
     <em><code class="parameter">apc.rfc1867</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </span>
    <dd>

     <p class="para">
      RFC1867 File Upload Progress hook handler is only available if APC 
      was compiled against PHP 5.2.0 or later. When enabled, any file uploads
      which includes a field called <em>APC_UPLOAD_PROGRESS</em>
      before the file field in an upload form will cause APC to automatically
      create an upload_<em class="emphasis">key</em> user cache entry where
      <em class="emphasis">key</em> is the value of the
      <em>APC_UPLOAD_PROGRESS</em> form entry.
     </p>
     <p class="para">
      Note that the hidden field specified by
      <em>APC_UPLOAD_PROGRESS</em> must come before the file field,
      otherwise the upload progress will not work correctly.
     </p>
     <p class="para">
      Note that the file upload tracking is not threadsafe at this point, so
      new uploads that happen while a previous one is still going will disable
      the tracking for the previous.
     </p>
     <p class="para">
      Note that the <em>rate</em> is only available once all file
      transfers are completed.
     </p>
     <p class="para">
      <div class="example" id="example-403">
       <p><strong>Example #1 An apc.rfc1867 example</strong></p>
       <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">apc_fetch</span><span style="color: #007700">(</span><span style="color: #DD0000">"upload_</span><span style="color: #0000BB">$_POST</span><span style="color: #007700">[</span><span style="color: #0000BB">APC_UPLOAD_PROGRESS</span><span style="color: #007700">]</span><span style="color: #DD0000">"</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
       </div>

       <div class="example-contents"><p>The above example will output
something similar to:</p></div>
       <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [total] =&gt; 1142543
    [current] =&gt; 1142543
    [rate] =&gt; 1828068.8
    [filename] =&gt; test
    [name] =&gt; file
    [temp_filename] =&gt; /tmp/php8F
    [cancel_upload] =&gt; 0
    [done] =&gt; 1
)
</pre></div>
       </div>
      </div>
     </p>
    </dd>

   </dt>

   
   <dt id="ini.apc.rfc1867-prefix">
    <span class="term">
     <em><code class="parameter">apc.rfc1867_prefix</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </span>
    <dd>

     <p class="para">
      Key prefix to use for the user cache entry generated by rfc1867 upload
      progress functionality.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.rfc1867-name">
    <span class="term">
     <em><code class="parameter">apc.rfc1867_name</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </span>
    <dd>

     <p class="para">
      Specify the hidden form entry name that activates APC upload progress
      and specifies the user cache key suffix.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.rfc1867-freq">
    <span class="term">
     <em><code class="parameter">apc.rfc1867_freq</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </span>
    <dd>

     <p class="para">
      The frequency that updates should be made to the user cache entry for
      upload progress.  This can take the form of a percentage of the total
      file size or a size in bytes optionally suffixed with
      <em>&quot;k&quot;</em>, <em>&quot;m&quot;</em>, or <em>&quot;g&quot;</em>
      for kilobytes, megabytes, or gigabytes respectively (case insensitive).
      A setting of 0 updates as often as possible, which may cause slower
      uploads.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.rfc1867-ttl">
    <span class="term">
     <em><code class="parameter">apc.rfc1867_ttl</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      <acronym>TTL</acronym> for rfc1867 entries.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.localcache">
    <span class="term">
     <em><code class="parameter">apc.localcache</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </span>
    <dd>

     <p class="para">
      This enables a lock-free local process shadow-cache which reduces lock
      contention when the cache is being written to.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.localcache.size">
    <span class="term">
     <em><code class="parameter">apc.localcache.size</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      The size of the local process shadow-cache, should be set to a
      sufficiently large value, approximately half of
      <a href="apc.configuration.html#ini.apc.num-files-hint" class="link">apc.num_files_hint</a>.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.coredump-unmap">
    <span class="term">
     <em><code class="parameter">apc.coredump_unmap</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
    </span>
    <dd>

     <p class="para">
      Enables APC handling of signals, such as SIGSEGV, that write
      core files when signaled. When these signals are received,
      APC will attempt to unmap the shared memory segment in order
      to exclude it from the core file. This setting may improve
      system stability when fatal signals are received and a large 
      APC shared memory segment is configured.
     </p>
     <div class="warning"><strong class="warning">Warning</strong>
      <p class="para">
       This feature is potentially dangerous. Unmapping the shared
       memory segment in a fatal signal handler may cause undefined
       behaviour if a fatal error occurs.
      </p>
     </div>
     <blockquote class="note"><p><strong class="note">Note</strong>: 
      <p class="para">
       Although some kernels may provide a facility to ignore various
       types of shared memory when generating a core dump file, these 
       implementations may also ignore important shared memory segments
       such as the Apache scoreboard.
      </p>
     </p></blockquote>
    </dd>

   </dt>


   <dt id="ini.apc.stat-ctime">
    <span class="term">
     <em><code class="parameter">apc.stat_ctime</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      Verification with ctime will avoid problems caused by programs such 
      as svn or rsync by making sure inodes haven&#039;t changed since the last 
      stat. APC will normally only check mtime.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.canonicalize">
    <span class="term">
     <em><code class="parameter">apc.canonicalize</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type bool">bool</a></span>
    </span>
    <dd>

     <p class="para">
      If on, then relative paths are canonicalized in no-stat mode. If set,
      then files included via stream wrappers can not be cached as
       <span class="function"><a href="function.realpath.html" class="function">realpath()</a></span> does not support stream wrappers.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.preload-path">
    <span class="term">
     <em><code class="parameter">apc.preload_path</code></em>
     <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
    </span>
    <dd>

     <p class="para">
      Optionally, set a path to the directory that APC will load 
      cache data at startup.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.use-request-time">
    <span class="term">
     <em><code class="parameter">apc.use_request_time</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type bool">bool</a></span>
    </span>
    <dd>

     <p class="para">
      Use the <acronym title="Server Application Programming Interface">SAPI</acronym> request start time for
      <acronym>TTL</acronym>.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.file-md5">
    <span class="term">
     <em><code class="parameter">apc.file_md5</code></em>
     <span class="type"><a href="language.types.boolean.html" class="type bool">bool</a></span>
    </span>
    <dd>

     <p class="para">
      Records a md5 hash of files.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.lazy-functions">
    <span class="term">
     <em><code class="parameter">apc.lazy_functions</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      Enables lazy loading for functions.
     </p>
    </dd>

   </dt>


   <dt id="ini.apc.lazy-classes">
    <span class="term">
     <em><code class="parameter">apc.lazy_classes</code></em>
     <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
    </span>
    <dd>

     <p class="para">
      Enables lazy loading for classes.
     </p>
    </dd>

   </dt>

  </dl>

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