6. DRCP and FAN Support
-----------------------
-The PHP 5.3 OCI8 Beta extension has support for the Oracle Database
-Resident Connection Pool (DRCP) and Fast Application Notification
-(FAN).
+The PHP OCI8 extension has support for the Oracle Database Resident
+Connection Pool (DRCP) and Fast Application Notification (FAN).
-This release is for Beta testing only. Questions and issues can be
-raised on the Oracle OTN forum (free registration required)
+Questions and issues can be raised on the Oracle OTN forum (free
+registration required):
http://www.oracle.com/technology/forums/php.html
9iR2 onwards. However, full functionality (e.g. DRCP support) is only
available when Oracle 11g is used.
-For other, general database functionality, the version of the Oracle
-libraries used by PHP does not necessarily have to match the version
-of the database.
+For general database functionality the version of the Oracle libraries
+used by PHP does not necessarily have to match the version of the
+database.
6.2. Database Resident Connection Pooling (DRCP)
6.4.2 Closing Connections
-With the PHP 5.3 OCI8 Beta extension, persistent connections can now
-be closed by the user, allowing greater control over connection
-resource usage. Persistent connections will now also be closed
-automatically when there is no PHP variable referencing them, such as
-at the end of scope of a PHP user function. This will rollback any
-uncommitted transaction. These changes to persistent connections make
-them behave similarly to non-persistent connections, simplifying the
-interface, allowing for greater application consistency and
-predictability. Use oci8.old_oci_close_semantics=1 to retain the
-historical behavior.
+With the PHP OCI8 extension, persistent connections can now be closed
+by the user, allowing greater control over connection resource usage.
+Persistent connections will now also be closed automatically when
+there is no PHP variable referencing them, such as at the end of scope
+of a PHP user function. This will rollback any uncommitted
+transaction. These changes to persistent connections make them behave
+similarly to non-persistent connections, simplifying the interface,
+allowing for greater application consistency and predictability. Use
+oci8.old_oci_close_semantics=1 to retain the historical behavior.
6.4.3 LOGON Triggers can be used to set session properties
<active>yes</active>
</lead>
- <date>2008-04-17</date>
- <time>16:00:00</time>
+ <date>2008-06-19</date>
+ <time>12:00:00</time>
<version>
- <release>1.3.2</release>
- <api>1.3.2</api>
+ <release>1.3.3</release>
+ <api>1.3.3</api>
</version>
<stability>
- <release>beta</release>
- <api>beta</api>
+ <release>stable</release>
+ <api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
-Refine DRCP connection pooling functionality
-Do scope-end release for oci_pconnect (oci8.old_oci_close_semantics=1 gives old behavior)
-Fixed bug #44372 (compilation with Oracle 10gR1 libraries)
-Fixed PECL bug #12431 (PEAR install using x86_64 RPM builds)
-Allow builds with PHP 4.3.9 onwards
+Changed OCI NLS initialization for consistency and technical correctness
+Removed obsolete macros
</notes>
<contents>
<dir name="/">
<file name="connect.inc" role="test" />
<file name="connect_old.phpt" role="test" />
<file name="connect.phpt" role="test" />
+ <file name="connect_scope1.phpt" role="test" />
+ <file name="connect_scope2.phpt" role="test" />
+ <file name="connect_scope_try1.phpt" role="test" />
+ <file name="connect_scope_try2.phpt" role="test" />
+ <file name="connect_scope_try3.phpt" role="test" />
+ <file name="connect_scope_try4.phpt" role="test" />
+ <file name="connect_scope_try5.phpt" role="test" />
+ <file name="connect_scope_try6.phpt" role="test" />
<file name="connect_with_charset_001.phpt" role="test" />
<file name="connect_without_oracle_home_old.phpt" role="test" />
<file name="connect_without_oracle_home.phpt" role="test" />
<file name="fetch_all3.phpt" role="test" />
<file name="fetch_all.phpt" role="test" />
<file name="fetch_array.phpt" role="test" />
- <file name="fetch_assoc.php" role="test" />
<file name="fetch_assoc.phpt" role="test" />
<file name="fetch_into1.phpt" role="test" />
<file name="fetch_into2.phpt" role="test" />
<file name="lob_null.phpt" role="test" />
<file name="lob_temp1.phpt" role="test" />
<file name="lob_temp.phpt" role="test" />
+ <file name="minfo.phpt" role="test" />
<file name="num.phpt" role="test" />
<file name="oci8safemode.phpt" role="test" />
<file name="oci_execute_segfault.phpt" role="test" />
</extsrcrelease>
<changelog>
+<release>
+ <version>
+ <release>1.3.2</release>
+ <api>1.3.2</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+Refine DRCP connection pooling functionality
+Do scope-end release for oci_pconnect (oci8.old_oci_close_semantics=1 gives old behavior)
+Fixed bug #44372 (compilation with Oracle 10gR1 libraries)
+Fixed PECL bug #12431 (PEAR install using x86_64 RPM builds)
+Allow builds with PHP 4.3.9 onwards
+ </notes>
+</release>
+
<release>
<version>
<release>1.3.1</release>
*/
#undef PHP_OCI8_VERSION
#endif
-#define PHP_OCI8_VERSION "1.3.3-dev"
+#define PHP_OCI8_VERSION "1.3.3"
extern zend_module_entry oci8_module_entry;
#define phpext_oci8_ptr &oci8_module_entry
--TEST--
SELECT oci_bind_by_name with SQLT_AFC aka CHAR
--SKIPIF--
-<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+<?php
+if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+require(dirname(__FILE__)."/connect.inc");
+$sv = oci_server_version($c);
+$sv = preg_match('/11.1/', $sv, $matches);
+if ($sv !== 1) {
+ die ("skip expected output only valid when using Oracle 11g database");
+}
+?>
--FILE--
<?php
--TEST--
SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates
--SKIPIF--
-<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+<?php
+if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+require(dirname(__FILE__)."/connect.inc");
+$sv = oci_server_version($c);
+$sv = preg_match('/11.1/', $sv, $matches);
+if ($sv !== 1) {
+ die ("skip expected output only valid when using Oracle 11g database");
+}
+?>
--FILE--
<?php
--TEST--
PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter
--SKIPIF--
-<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+<?php
+if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+require(dirname(__FILE__)."/connect.inc");
+$sv = oci_server_version($c);
+$sv = preg_match('/11.1/', $sv, $matches);
+if ($sv !== 1) {
+ die ("skip expected output only valid when using Oracle 11g database");
+}
+?>
--FILE--
<?php
--TEST--
PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter
--SKIPIF--
-<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
+<?php
+if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+require(dirname(__FILE__)."/connect.inc");
+$sv = oci_server_version($c);
+$sv = preg_match('/11.1/', $sv, $matches);
+if ($sv !== 1) {
+ die ("skip expected output only valid when using Oracle 11g database");
+}
+?>
--FILE--
<?php
--TEST--
Bug #27303 (OCIBindByName binds numeric PHP values as characters)
--SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+<?php
+if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+require(dirname(__FILE__)."/connect.inc");
+$sv = oci_server_version($c);
+$sv = preg_match('/11.1/', $sv, $matches);
+if ($sv !== 1) {
+ die ("skip expected output only valid when using Oracle 11g database");
+}
+?>
--FILE--
<?php
--TEST--
Bug #27303 (OCIBindByName binds numeric PHP values as characters)
--SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+<?php
+if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+require(dirname(__FILE__)."/connect.inc");
+$sv = oci_server_version($c);
+$sv = preg_match('/11.1/', $sv, $matches);
+if ($sv !== 1) {
+ die ("skip expected output only valid when using Oracle 11g database");
+}
+?>
--FILE--
<?php
--TEST--
Bug #27303 (OCIBindByName binds numeric PHP values as characters)
--SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+<?php
+if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+require(dirname(__FILE__)."/connect.inc");
+$sv = oci_server_version($c);
+$sv = preg_match('/11.1/', $sv, $matches);
+if ($sv !== 1) {
+ die ("skip expected output only valid when using Oracle 11g database");
+}
+?>
--FILE--
<?php
include "details.inc";
-/*
- * You should have privileges to create tables in this schema
- *
- * */
-/*
-$schema = "system";
-*/
+if (!empty($dbase)) {
+ $c = @oci_connect($user, $password, $dbase);
+}
+else {
+ $c = @oci_connect($user, $password);
+}
-$table_name = "tb".substr(str_replace(Array(".", "-"), "_", php_uname("n")), 0, 5);
-$type_name = strtoupper("tp".substr(str_replace(Array(".", "-"), "_", php_uname("n")), 0, 5));
-
- if (!empty($dbase)) {
- $c = ocilogon($user,$password,$dbase);
- }
- else {
- $c = ocilogon($user,$password);
- }
-
- if (!empty($schema)) {
- $schema = $schema.".";
- }
- else {
- $schema = '';
- }
+if (!$c) {
+ echo "connect.inc: Failed to connect as '$user' to '$dbase'\n";
+ $e = oci_error();
+ echo $e['message']."\n";
+}
?>
--TEST--
oci_internal_debug()
--SKIPIF--
-<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+<?php
+if (!extension_loaded('oci8')) die("skip no oci8 extension");
+ob_start();
+phpinfo(INFO_MODULES);
+$phpinfo = ob_get_clean();
+$iv = preg_match('/Oracle .*Version => 11/', $phpinfo);
+if ($iv !== 1) {
+ die ("skip expected output only valid when using Oracle 11g client libraries");
+}
+?>
--FILE--
<?php
-require dirname(__FILE__)."/connect.inc";
+require(dirname(__FILE__)."/details.inc");
oci_internal_debug(true);
?>
--EXPECTF--
OCI8 DEBUG: OCINlsEnvironmentVariableGet at (%s:%d)
-OCI8 DEBUG L1: Got a cached connection: (%s) at (%s:%d)
-Done
+OCI8 DEBUG L1: Got NO cached connection at (%s:%d)
+OCI8 DEBUG: OCIEnvNlsCreate at (%s:%d)
+OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
+OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
+OCI8 DEBUG: OCISessionPoolCreate at (%s:%d)
+OCI8 DEBUG: OCIAttrSet at (%s:%d)
+OCI8 DEBUG L1: create_spool: (%s:%d)
+OCI8 DEBUG L1: using shared pool: (%s:%d)
+OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
+OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
+OCI8 DEBUG: OCIAttrSet at (%s:%d)
+OCI8 DEBUG: OCIAttrSet at (%s:%d)
+OCI8 DEBUG: OCIAttrGet at (%s:%d)
+OCI8 DEBUG: OCIAttrGet at (%s:%d)
+OCI8 DEBUG L1: (%s:%d)
+OCI8 DEBUG: OCISessionGet at (%s:%d)
+OCI8 DEBUG: OCIAttrGet at (%s:%d)
+OCI8 DEBUG: OCIAttrGet at (%s:%d)
+OCI8 DEBUG: OCIContextGetValue at (%s:%d)
+OCI8 DEBUG: OCIContextGetValue at (%s:%d)
+OCI8 DEBUG: OCIMemoryAlloc at (%s:%d)
+OCI8 DEBUG: OCIContextSetValue at (%s:%d)
+OCI8 DEBUG: OCIAttrSet at (%s:%d)
+OCI8 DEBUG L1: New Non-Persistent Connection address: (%s) at (%s:%d)
+OCI8 DEBUG L1: num_persistent=(%s:%d)
OCI8 DEBUG: OCISessionRelease at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCISessionPoolDestroy at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
-OCI8 DEBUG: OCIHandleFree at (%s:%d)
+Done
} else {
$user = "system";
$password = "system";
- $dbase = "oracle";
- $oracle_on_localhost = FALSE;
+ $dbase = "localhost/XE";
+ $oracle_on_localhost = TRUE;
$test_drcp = FALSE;
}
+/*
+ * Common object names for scripts to use
+ */
+
+$table_name = "tb".substr(str_replace(Array(".", "-"), "_", php_uname("n")), 0, 5);
+$type_name = strtoupper("tp".substr(str_replace(Array(".", "-"), "_", php_uname("n")), 0, 5));
+$schema = '';
+
?>