Skip to content

Commit 942bea0

Browse files
authored
Merge pull request #15 from cjbj/oci8ini
Add sample oci8.ini file (Issue #14)
2 parents 22a78b3 + 581e2c5 commit 942bea0

File tree

3 files changed

+95
-9
lines changed

3 files changed

+95
-9
lines changed

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# The OCI8 Extension
1+
# The PHP OCI8 Extension
22

3-
Use the OCI8 extension to access Oracle Database.
3+
Use the PHP OCI8 extension to access Oracle Database.
44

55
Documentation is at https://www.php.net/oci8
66

@@ -12,14 +12,23 @@ Use `pecl install oci8-3.0.1` to install for PHP 8.0.
1212

1313
Use `pecl install oci8-2.2.0` to install for PHP 7.
1414

15-
The OCI8 extension can be linked with Oracle client libraries from Oracle
16-
Database 11.2 or later. These libraries are found in your database
15+
The PHP OCI8 extension can be linked with Oracle client libraries from Oracle
16+
Database 11.2 or later. These libraries are found in your database
1717
installation, or in the free Oracle Instant Client from
18-
https://www.oracle.com/database/technologies/instant-client.html
18+
https://www.oracle.com/database/technologies/instant-client.html
1919
Install the 'Basic' or 'Basic Light' Instant Client package. If building from
2020
source, then also install the SDK package.
2121

22-
Oracle's standard cross-version connectivity applies. For example, PHP OCI8
23-
linked with Instant Client 19c can connect to Oracle Database 11.2 onward. See
24-
Oracle's note "Oracle Client / Server Interoperability Support" (ID 207303.1)
25-
for details.
22+
Oracle Database's standard cross-version connectivity applies. For example, PHP
23+
OCI8 linked with Instant Client 19c can connect to Oracle Database 11.2 or
24+
later. See Oracle Support's note "Oracle Client / Server Interoperability
25+
Support" (ID 207303.1) for details.
26+
27+
A sample configuration php.ini file is at
28+
https://github.com/php/pecl-database-oci8/blob/main/oci8.ini
29+
30+
From PHP 8.4 the source code for PHP OCI8 is at:
31+
https://github.com/php/pecl-database-oci8/
32+
33+
For earlier versions, see the PHP source, e.g.:
34+
https://github.com/php/php-src/tree/PHP-8.3/ext/oci8

oci8.ini

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[OCI8]
2+
3+
; Required if your installation does not already add this line.
4+
;extension=oci8
5+
; On Windows use:
6+
;extension=oci8_19 ; Use with Oracle Database 19c Instant Client
7+
8+
; Connection: Enables privileged connections using external credentials
9+
; (OCI_SYSOPER, OCI_SYSDBA)
10+
; https://php.net/oci8.privileged-connect
11+
;
12+
;oci8.privileged_connect = Off
13+
14+
; Connection: The maximum number of persistent OCI8 connections per process.
15+
; Using -1 means no limit.
16+
; https://php.net/oci8.max-persistent
17+
;
18+
;oci8.max_persistent = -1
19+
20+
; Connection: The maximum number of seconds a process is allowed to maintain an
21+
; idle persistent connection. Using -1 means idle persistent connections will
22+
; be maintained forever.
23+
; https://php.net/oci8.persistent-timeout
24+
;
25+
;oci8.persistent_timeout = -1
26+
27+
; Connection: The number of seconds that must pass before issuing an internal
28+
; round-trip ping from OCI8 to the database when oci_pconnect() is called. If
29+
; the internally-chosen connection is not usable, it is destroyed and different
30+
; connection returned to the application. When set to 0, each oci_pconnect()
31+
; will cause a ping. Using -1 disables pings completely.
32+
; https://php.net/oci8.ping-interval
33+
;
34+
;oci8.ping_interval = 60
35+
36+
; Connection: For Oracle Database Resident Connection Pooling (DRCP), set this
37+
; to a user-chosen connection class string. To use DRCP: (i) this parameter
38+
; should be set to the same value for all web servers running the same
39+
; application, (ii) the DRCP pool must be started in the database, and (iii)
40+
; the connection string must also specify to use a pooled server.
41+
; https://www.php.net/manual/oci8.configuration.php#ini.oci8.connection-class
42+
;
43+
;oci8.connection_class =
44+
45+
; High Availability: Using On lets PHP receive Fast Application Notification
46+
; (FAN) events generated when a database node fails. The database must also be
47+
; configured to post FAN events.
48+
; https://www.php.net/manual/en/oci8.configuration.php#ini.oci8.events
49+
;
50+
;oci8.events = Off
51+
52+
; Tuning: This option enables statement caching, and specifies how many
53+
; statements to cache. Using 0 disables statement caching.
54+
; https://php.net/oci8.statement-cache-size
55+
;
56+
;oci8.statement_cache_size = 20
57+
58+
; Tuning: Enables row prefetching and sets the default number of rows that will
59+
; be fetched automatically after statement execution. Tuning this can improve
60+
; performance by reducing round-trips.
61+
; https://php.net/oci8.default-prefetch
62+
;
63+
;oci8.default_prefetch = 100
64+
65+
; Tuning: Sets the amount of LOB data that is internally returned from Oracle
66+
; Database when an Oracle LOB locator is initially retrieved as part of a
67+
; query. Setting this can improve performance by reducing round-trips.
68+
; https://www.php.net/manual/oci8.configuration.php#ini.oci8.prefetch-lob-size
69+
;
70+
;oci8.prefetch_lob_size = 0
71+
72+
; Compatibility: Using On means oci_close() will not close oci_connect() and
73+
; oci_new_connect() connections.
74+
; https://php.net/oci8.old-oci-close-semantics
75+
;
76+
;oci8.old_oci_close_semantics = Off

package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin
436436
<file name="php_oci8_int.h" role="src" />
437437
<file name="oci8.stub.php" role="src" />
438438
<file name="oci8_arginfo.h" role="src" />
439+
<file name="oci8.ini" role="doc" />
439440
<file name="README.md" role="doc" />
440441
</dir> <!-- / -->
441442
</contents>

0 commit comments

Comments
 (0)