mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
372 lines
14 KiB
XML
372 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<section xml:id="oci8.configuration" xmlns="http://docbook.org/ns/docbook">
|
|
&reftitle.runtime;
|
|
&extension.runtime;
|
|
<para>
|
|
<table>
|
|
<title>OCI8 Configuration Options</title>
|
|
<tgroup cols="4">
|
|
<thead>
|
|
<row>
|
|
<entry>&Name;</entry>
|
|
<entry>&Default;</entry>
|
|
<entry>&Changeable;</entry>
|
|
<entry>&Changelog;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody xml:id="oci8.configuration.list">
|
|
<row>
|
|
<entry><link linkend="ini.oci8.connection-class">oci8.connection_class</link></entry>
|
|
<entry>""</entry>
|
|
<entry>PHP_INI_ALL</entry>
|
|
<entry>Available since PECL OCI8 1.3.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.oci8.default-prefetch">oci8.default_prefetch</link></entry>
|
|
<entry>"100"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry>Available since PECL OCI8 1.1.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.oci8.events">oci8.events</link></entry>
|
|
<entry>Off</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry>Available since PECL OCI8 1.3.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.oci8.max-persistent">oci8.max_persistent</link></entry>
|
|
<entry>"-1"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry>Available since PECL OCI8 1.1.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.oci8.old-oci-close-semantics">oci8.old_oci_close_semantics</link></entry>
|
|
<entry>Off</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry>Available since PECL OCI8 1.1.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.oci8.persistent-timeout">oci8.persistent_timeout</link></entry>
|
|
<entry>"-1"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry>Available since PECL OCI8 1.1.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.oci8.ping-interval">oci8.ping_interval</link></entry>
|
|
<entry>"60"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry>Available since PECL OCI8 1.1.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.oci8.privileged-connect">oci8.privileged_connect</link></entry>
|
|
<entry>Off</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry>Available since PECL OCI8 1.1.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.oci8.statement-cache-size">oci8.statement_cache_size</link></entry>
|
|
<entry>"20"</entry>
|
|
<entry>PHP_INI_SYSTEM</entry>
|
|
<entry>Available since PECL OCI8 1.1.</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
&ini.descriptions.title;
|
|
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="ini.oci8.connection-class">
|
|
<term>
|
|
<parameter>oci8.connection_class</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This user defined text should always be set when using Oracle Database
|
|
Resident Connection Pooling (DRCP). It allows sub-partitioning of the
|
|
DRCP connection pool, allowing 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.
|
|
</para>
|
|
<para>
|
|
The value can be set at runtime
|
|
with <function>ini_set</function> prior to connecting.
|
|
</para>
|
|
<para>
|
|
To use DRCP, OCI8 must be linked with Oracle 11<emphasis>g</emphasis>
|
|
(or later) libraries and the database must be Oracle
|
|
11<emphasis>g</emphasis> (or later). The DRCP connection pool must be
|
|
enabled in the database, the <literal>oci8.connection_class</literal>
|
|
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. The application should use persistent connections.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.oci8.default-prefetch">
|
|
<term>
|
|
<parameter>oci8.default_prefetch</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<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 <literal>0</literal> turns off prefetching.
|
|
</para>
|
|
<para>
|
|
The prefetch value does not alter the number of rows that
|
|
functions like <function>oci_fetch_array</function> return to
|
|
the user; the prefetching and caching of rows is handled
|
|
internally in OCI8.
|
|
</para>
|
|
<para>
|
|
The value can be set per-statement
|
|
with <function>oci_set_prefetch</function> prior to statement
|
|
execution.
|
|
</para>
|
|
<para>
|
|
In PHP 5.3 (PECL OCI8 1.3.4) the default value was increased
|
|
from <literal>10</literal> to <literal>100</literal>.
|
|
</para>
|
|
<para>
|
|
In PHP 5.3.2 (PECL OCI8 1.4) the minimum value settable was
|
|
reduced from <literal>1</literal> to <literal>0</literal>,
|
|
allowing prefetching to be turned off.
|
|
</para>
|
|
<para>
|
|
When using Oracle Database 12<emphasis>c</emphasis> (or later), the prefetch
|
|
value set by PHP can be overridden by Oracle's
|
|
client <literal>oraaccess.xml</literal> configuration file. Refer
|
|
to Oracle documentation for more detail.
|
|
</para>
|
|
<note>
|
|
<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.
|
|
</simpara>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.oci8.events">
|
|
<term>
|
|
<parameter>oci8.events</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Using <literal>On</literal> allows PHP to be notified of
|
|
database Fast Application Notification (FAN) events.
|
|
</para>
|
|
<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.
|
|
</para>
|
|
<para>
|
|
When using <literal>On</literal>, the database must also be
|
|
configured to post FAN events.
|
|
</para>
|
|
<para>
|
|
FAN support is available when OCI8 is linked with Oracle
|
|
10<emphasis>g</emphasis>R2 (or later) libraries and connected to Oracle Database
|
|
10<emphasis>g</emphasis>R2 (or later).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.oci8.max-persistent">
|
|
<term>
|
|
<parameter>oci8.max_persistent</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
The maximum number of persistent OCI8 connections per PHP
|
|
process. Setting this option to -1 means that there is no
|
|
limit.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.oci8.old-oci-close-semantics">
|
|
<term>
|
|
<parameter>oci8.old_oci_close_semantics</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This option controls <function>oci_close</function> behaviour.
|
|
Enabling it means that <function>oci_close</function> 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 <emphasis>strongly encouraged</emphasis> to
|
|
adjust the <function>oci_close</function> calls in your
|
|
application instead of enabling this option.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.oci8.persistent-timeout">
|
|
<term>
|
|
<parameter>oci8.persistent_timeout</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<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 <function>oci_close</function>.
|
|
</para>
|
|
<note>
|
|
<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<emphasis>g</emphasis> resolves the memory
|
|
and resource issues
|
|
that <literal>oci8.max_persistent</literal>
|
|
and <literal>oci8.persistent_timeout</literal> previously
|
|
attempted to overcome.
|
|
</simpara>
|
|
</note>
|
|
<note>
|
|
<simpara>
|
|
In PHP 5.3 (PECL OCI8 1.3), persistent connections can be
|
|
closed with <function>oci_close</function>.
|
|
</simpara>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.oci8.ping-interval">
|
|
<term>
|
|
<parameter>oci8.ping_interval</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
The number of seconds that must pass before issuing a ping
|
|
during <function>oci_pconnect</function>. A ping ensures
|
|
that the database connection is valid. When set to 0,
|
|
persistent connections will be pinged every
|
|
time <function>oci_pconnect</function> is called. To disable
|
|
pings completely, set this option to -1.
|
|
</para>
|
|
<note>
|
|
<simpara>
|
|
Disabling pings allows <function>oci_pconnect</function> 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
|
|
<function>oci_pconnect</function> documentation for more information.
|
|
</simpara>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.oci8.privileged-connect">
|
|
<term>
|
|
<parameter>oci8.privileged_connect</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This option allows connections to use the privileged external
|
|
credentials
|
|
<constant>OCI_SYSOPER</constant> or <constant>OCI_SYSDBA</constant>.
|
|
</para>
|
|
<note>
|
|
<simpara>
|
|
Seting this <literal>On</literal> 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.
|
|
</simpara>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.oci8.statement-cache-size">
|
|
<term>
|
|
<parameter>oci8.statement_cache_size</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
This option enables statement caching, and specifies how many
|
|
statements to cache. To disable statement caching just set
|
|
this option to 0.
|
|
</para>
|
|
<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 "cursors" may be
|
|
held open under the assumption that statements will be
|
|
reused.
|
|
</para>
|
|
<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.
|
|
</para>
|
|
<para>
|
|
This option is of most use with persistent connections.
|
|
</para>
|
|
<para>
|
|
When using Oracle Database 12<emphasis>c</emphasis> (or later), this
|
|
value can be overridden and automatically tuned by Oracle's
|
|
client <literal>oraaccess.xml</literal> file. Refer to
|
|
Oracle documentation for more detail.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</section>
|
|
|
|
<!-- 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
|
|
-->
|
|
|
|
|