Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 10051

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="oci8.test.html">Testing</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="oci8.constants.html">Predefined Constants</a></div>
 <div class="up"><a href="oci8.setup.html">Installing/Configuring</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="oci8.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">
     <table class="doctable table">
      <caption><strong>OCI8 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="oci8.configuration.html#ini.oci8.connection-class" class="link">oci8.connection_class</a></td>
         <td>&quot;&quot;</td>
         <td>PHP_INI_ALL</td>
         <td>Available since PHP 5.3 (PECL OCI8 1.3).</td>
        </tr>

        <tr>
         <td><a href="oci8.configuration.html#ini.oci8.default-prefetch" class="link">oci8.default_prefetch</a></td>
         <td>&quot;100&quot;</td>
         <td>PHP_INI_SYSTEM</td>
         <td>Available since PHP 5.1.2 (PECL OCI8 1.1).</td>
        </tr>

        <tr>
         <td><a href="oci8.configuration.html#ini.oci8.events" class="link">oci8.events</a></td>
         <td>Off</td>
         <td>PHP_INI_SYSTEM</td>
         <td>Available since PHP 5.3 (PECL OCI8 1.3).</td>
        </tr>

        <tr>
         <td><a href="oci8.configuration.html#ini.oci8.max-persistent" class="link">oci8.max_persistent</a></td>
         <td>&quot;-1&quot;</td>
         <td>PHP_INI_SYSTEM</td>
         <td>Available since PHP 5.1.2 (PECL OCI8 1.1).</td>
        </tr>

        <tr>
         <td><a href="oci8.configuration.html#ini.oci8.old-oci-close-semantics" class="link">oci8.old_oci_close_semantics</a></td>
         <td>Off</td>
         <td>PHP_INI_SYSTEM</td>
         <td>Available since PHP 5.1.2 (PECL OCI8 1.1).</td>
        </tr>

        <tr>
         <td><a href="oci8.configuration.html#ini.oci8.persistent-timeout" class="link">oci8.persistent_timeout</a></td>
         <td>&quot;-1&quot;</td>
         <td>PHP_INI_SYSTEM</td>
         <td>Available since PHP 5.1.2 (PECL OCI8 1.1).</td>
        </tr>

        <tr>
         <td><a href="oci8.configuration.html#ini.oci8.ping-interval" class="link">oci8.ping_interval</a></td>
         <td>&quot;60&quot;</td>
         <td>PHP_INI_SYSTEM</td>
         <td>Available since PHP 5.1.2 (PECL OCI8 1.1).</td>
        </tr>

        <tr>
         <td><a href="oci8.configuration.html#ini.oci8.privileged-connect" class="link">oci8.privileged_connect</a></td>
         <td>Off</td>
         <td>PHP_INI_SYSTEM</td>
         <td>Available since PHP 5.1.2 (PECL OCI8 1.1).</td>
        </tr>

        <tr>
         <td><a href="oci8.configuration.html#ini.oci8.statement-cache-size" class="link">oci8.statement_cache_size</a></td>
         <td>&quot;20&quot;</td>
         <td>PHP_INI_SYSTEM</td>
         <td>Available since PHP 5.1.2 (PECL OCI8 1.1).</td>
        </tr>

       </tbody>
      
     </table>

    </p>
    
    <p class="para">Here&#039;s a short explanation of
the configuration directives.</p>
    
    <p class="para">
     <dl>

      <dt id="ini.oci8.connection-class">
       <span class="term">
        <em><code class="parameter">oci8.connection_class</code></em>
        <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
       </span>
       <dd>

        <p class="para">
         This user defined text is used by Oracle 11<em class="emphasis">g</em> Database
         Resident Connection Pooling (DRCP) connections to
         sub-partition the connection pool.  It allows OCI8 persistent
         connections from an application to reuse database sessions
         from a previous PHP script, giving better scalability.  When
         an application uses a database pooled process previously used
         with a different connection class, the session settings such
         as the default Oracle date format are reset.  This prevents
         accidental sharing of information between different
         applications.
        </p>
        <p class="para">
         The value can be set at runtime
         with  <span class="function"><a href="function.ini-set.html" class="function">ini_set()</a></span> prior to connecting.
        </p>
        <p class="para">
         To use DRCP, OCI8 must be linked with Oracle 11<em class="emphasis">g</em> libraries
         and the database must be Oracle 11<em class="emphasis">g</em>.  The connection pool
         must be enabled in the database,
         the <em>oci8.connection_class</em> should be set to
         the same string for all web servers running the same
         application, and the OCI8 connection string must specify to
         use a pooled server.
        </p>
       </dd>

      </dt>

      <dt id="ini.oci8.default-prefetch">
       <span class="term">
        <em><code class="parameter">oci8.default_prefetch</code></em>
        <span class="type"><a href="language.types.integer.html" class="type int">int</a></span>
       </span>
       <dd>

        <p class="para">
         This option sets the default number of extra rows that will
         be fetched and cached automatically whenever a low-level
         request for data from the database is made.  Setting a value
         of <em>0</em> turns off prefetching.
        </p>
        <p class="para">
         The prefetch value does not alter the number of rows that
         functions like  <span class="function"><a href="function.oci-fetch-array.html" class="function">oci_fetch_array()</a></span> return to
         the user; the prefetching and caching of rows is handled
         internally in OCI8.
        </p>
        <p class="para">
         The value can be set per-statement
         with  <span class="function"><a href="function.oci-set-prefetch.html" class="function">oci_set_prefetch()</a></span> prior to statement
         execution.
        </p>
        <p class="para">
         In PHP 5.3 (PECL OCI8 1.3.4) the default value was increased
         from <em>10</em> to <em>100</em>.
        </p>
        <p class="para">
         In PHP 5.3.2 (PECL OCI8 1.4) the minimum value settable was
         reduced from <em>1</em> to <em>0</em>,
         allowing prefetching to be turned off.
        </p>
        <p class="para">
          When using Oracle Database 12<em class="emphasis">c</em>, the prefetch
          value set by PHP can be overridden by Oracle&#039;s
          client <em>oraaccess.xml</em> configuration file.  Refer
          to Oracle documentation for more detail.
        </p>
        <blockquote class="note"><p><strong class="note">Note</strong>: 
         <span class="simpara">
          A larger prefetch can result in improved performance, at the
          cost of some increased memory usage. For queries that return
          large amounts of data, the performance benefit can be
          significant.
         </span>
        </p></blockquote>
       </dd>

      </dt>

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

        <p class="para">
         Using <em>On</em> allows PHP to be notified of
         database Fast Application Notification (FAN) events.
        </p>
        <p class="para">
         Without FAN, when a database instance or machine node fails
         unexpectedly, PHP applications may be blocked waiting for a
         database response until a TCP timeout expires.  With FAN
         events, PHP applications are quickly notified of failures
         that affect their established database connections.  The OCI8
         extension will clean up unusable connections in the
         persistent connection cache.
        </p>
        <p class="para">
         When using <em>On</em>, the database must also be
         configured to post FAN events.
        </p>
        <p class="para">
         FAN support is available when OCI8 is linked with Oracle
         10<em class="emphasis">g</em>R2 (or later) libraries and connected to Oracle Database
         10<em class="emphasis">g</em>R2 (or later).
        </p>
       </dd>

      </dt>

      <dt id="ini.oci8.max-persistent">
       <span class="term">
        <em><code class="parameter">oci8.max_persistent</code></em>
        <span class="type"><a href="language.types.integer.html" class="type int">int</a></span>
       </span>
       <dd>

        <p class="para">
         The maximum number of persistent OCI8 connections per PHP
         process.  Setting this option to -1 means that there is no
         limit.
        </p>
       </dd>

      </dt>

      <dt id="ini.oci8.old-oci-close-semantics">
       <span class="term">
        <em><code class="parameter">oci8.old_oci_close_semantics</code></em>
        <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
       </span>
       <dd>

        <p class="para">
         This option controls  <span class="function"><a href="function.oci-close.html" class="function">oci_close()</a></span> behaviour.
         Enabling it means that  <span class="function"><a href="function.oci-close.html" class="function">oci_close()</a></span> will do 
         nothing; the connection will not be
         closed until the end of the script. This is for backward
         compatibility only. If you find that you need to enable this 
         setting, you are <em class="emphasis">strongly encouraged</em> to 
         adjust the  <span class="function"><a href="function.oci-close.html" class="function">oci_close()</a></span> calls in your 
         application instead of enabling this option.
        </p>
       </dd>

      </dt>

      <dt id="ini.oci8.persistent-timeout">
       <span class="term">
        <em><code class="parameter">oci8.persistent_timeout</code></em>
        <span class="type"><a href="language.types.integer.html" class="type int">int</a></span>
       </span>
       <dd>

        <p class="para">
         The maximum number of seconds that a PHP process is allowed
         to keep an idle persistent connection open.  Setting this
         option to -1 means that idle persistent connections will be
         retained until the PHP process terminates or the connection
         is explicitly closed with  <span class="function"><a href="function.oci-close.html" class="function">oci_close()</a></span>.
        </p>
        <blockquote class="note"><p><strong class="note">Note</strong>: 
         <span class="simpara">
          In PHP, the expiry of idle resources is not alarm-based. It
          occurs when PHP finishes processing a script and checks the
          last-used timestamp of resources.  Hence there is a paradox
          that idle connections can only be closed when there is some
          activity (though not necessarily OCI8 related) in the PHP
          process.  If there is more than one PHP process then each
          must individually be activated in order to trigger expiry of
          its idle resources.  The introduction of Database Resident
          Connection Pooling (DRCP) in Oracle 11<em class="emphasis">g</em> resolves the memory
          and resource issues
          that <em>oci8.max_persistent</em>
          and <em>oci8.persistent_timeout</em> previously
          attempted to overcome.
         </span>
        </p></blockquote>
        <blockquote class="note"><p><strong class="note">Note</strong>: 
         <span class="simpara">
          In PHP 5.3 (PECL OCI8 1.3), persistent connections can be
          closed with  <span class="function"><a href="function.oci-close.html" class="function">oci_close()</a></span>.
         </span>
        </p></blockquote>
       </dd>

      </dt>

      <dt id="ini.oci8.ping-interval">
       <span class="term">
        <em><code class="parameter">oci8.ping_interval</code></em>
        <span class="type"><a href="language.types.integer.html" class="type int">int</a></span>
       </span>
       <dd>

        <p class="para">
          The number of seconds that must pass before issuing a ping
          during  <span class="function"><a href="function.oci-pconnect.html" class="function">oci_pconnect()</a></span>. A ping ensures
          that the database connection is valid. When set to 0,
          persistent connections will be pinged every
          time  <span class="function"><a href="function.oci-pconnect.html" class="function">oci_pconnect()</a></span> is called. To disable
          pings completely, set this option to -1.
        </p>
        <blockquote class="note"><p><strong class="note">Note</strong>: 
         <span class="simpara">
          Disabling pings allows  <span class="function"><a href="function.oci-pconnect.html" class="function">oci_pconnect()</a></span> to
          operate at the highest efficiency, but PHP may not be able
          to detect unusable connections, such as caused by network
          dropout, or if the Oracle database has gone down since PHP
          connected, until the connection is used later in the
          script. Consult the
           <span class="function"><a href="function.oci-pconnect.html" class="function">oci_pconnect()</a></span> documentation for more information.
         </span>
        </p></blockquote>
       </dd>

      </dt>

      <dt id="ini.oci8.privileged-connect">
       <span class="term">
        <em><code class="parameter">oci8.privileged_connect</code></em>
        <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
       </span>
       <dd>

        <p class="para">
         This option allows connections to use the privileged external
         credentials
         <strong><code>OCI_SYSOPER</code></strong> or <strong><code>OCI_SYSDBA</code></strong>.
        </p>
        <blockquote class="note"><p><strong class="note">Note</strong>: 
         <span class="simpara">
          Seting this <em>On</em> can allow scripts on web
          servers running with the appropriate OS user privileges to
          connect as privileged database users without requiring a
          database password.  This can be a security risk.
         </span>
        </p></blockquote>
       </dd>

      </dt>

      <dt id="ini.oci8.statement-cache-size">
       <span class="term">
        <em><code class="parameter">oci8.statement_cache_size</code></em>
        <span class="type"><a href="language.types.integer.html" class="type int">int</a></span>
       </span>
       <dd>

        <p class="para">
         This option enables statement caching, and specifies how many
         statements to cache. To disable statement caching just set
         this option to 0.
        </p>
        <p class="para">
         Statement caching removes the need to transmit the statement
         text to the database and removes the need to transmit any
         meta data about the statement back to PHP.  This can
         significantly improve overall system performance in
         applications which reuse statements during the lifetime of a
         connection.  Some extra database &quot;cursors&quot; may be
         held open under the assumption that statements will be
         reused.
        </p>
        <p class="para">
         Set this value to the size of the working set of statements
         used by your application. Setting too small a value can cause
         statements to be flushed from the cache before they are
         reused.
        </p>
        <p class="para">
         This option is of most use with persistent connections.
        </p>
        <p class="para">
         When using Oracle Database 12<em class="emphasis">c</em>, this
         value can be overridden and automatically tuned by Oracle&#039;s
         client <em>oraaccess.xml</em> file.  Refer to
         Oracle documentation for more detail.
        </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="oci8.test.html">Testing</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="oci8.constants.html">Predefined Constants</a></div>
 <div class="up"><a href="oci8.setup.html">Installing/Configuring</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>