这些函数的行为受 php.ini 的影响。
Name | Default | Changeable | Changelog |
---|---|---|---|
oci8.privileged_connect | "0" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
oci8.max_persistent | "-1" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
oci8.persistent_timeout | "-1" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
oci8.ping_interval | "60" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
oci8.statement_cache_size | "20" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
oci8.default_prefetch | "10" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
oci8.old_oci_close_semantics | "0" | PHP_INI_SYSTEM | Available since PHP 5.1.2. |
以下是配置选项的简要解释。
This option enables privileged connections using external credentials (OCI_SYSOPER, OCI_SYSDBA).
The maximum number of persistent OCI8 connections per process. Setting this option to -1 means that there is no limit.
The maximum length of time (in seconds) that a given process is allowed to maintain an idle persistent connection. Setting this option to -1 means that idle persistent connections will be maintained forever.
The length of time (in seconds) that must pass before issuing a ping during oci_pconnect(). When set to 0, persistent connections will be pinged every time they are reused. To disable pings completely, set this option to -1.
Note: Disabling pings will cause oci_pconnect() calls to operate at the highest efficiency, but may cause PHP to not detect faulty connections, such as those caused by network partitions, or if the Oracle server has gone down since PHP connected, until later in the script. Consult the oci_pconnect() documentation for more information.
This option enables statement caching, and specifies how many statements to cache. To disable statement caching just set this option to 0.
Note: A larger cache can result in improved performance, at the cost of increased memory usage.
This option enables statement prefetching and sets the default number of rows that will be fetched automatically after statement execution.
Note: A larger prefetch can result in improved performance, at the cost of increased memory usage.
This option controls oci_close() behaviour. Enabling it means that oci_close() 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 strongly encouraged to remove the oci_close() calls from your application instead of enabling this option.