]> granicus.if.org Git - php/commitdiff
MFB: sync with 5.3
authorChristopher Jones <sixd@php.net>
Thu, 19 Jun 2008 20:24:00 +0000 (20:24 +0000)
committerChristopher Jones <sixd@php.net>
Thu, 19 Jun 2008 20:24:00 +0000 (20:24 +0000)
12 files changed:
ext/oci8/README
ext/oci8/php_oci8.h
ext/oci8/tests/bind_char_1.phpt
ext/oci8/tests/bind_char_2.phpt
ext/oci8/tests/bind_char_3.phpt
ext/oci8/tests/bind_char_4.phpt
ext/oci8/tests/bug27303.phpt
ext/oci8/tests/bug27303_2.phpt
ext/oci8/tests/bug27303_4.phpt
ext/oci8/tests/connect.inc
ext/oci8/tests/debug.phpt
ext/oci8/tests/details.inc

index 74d1e18c286a647233366241826329c5ada09541..3b26318d4d2a15aff99592ce9db4c4cdabe1fc15 100644 (file)
@@ -169,12 +169,11 @@ directory will contain logs of any failures.
 6. DRCP and FAN Support
 -----------------------
 
-The PHP 6 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
 
 
@@ -184,9 +183,9 @@ The OCI8 extension will compile with Oracle libraries from version
 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)
@@ -329,16 +328,15 @@ restriction of Oracle Database 11g.
 
 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 6 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
 
index 66eaff9b07d36dc2c4f805935fa4a322c2b80f6a..d0c19bf7132a2d0a1ba2e14cc94ca64ca8cf3ac1 100644 (file)
@@ -39,7 +39,7 @@
 /*
  * The version of the OCI8 extension.
  */
-#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
index 5f5c62920f0fab1d38641d78128ffb44bece56ea..d9c95eb0040c47f8c056f1003db42ea423a478c9 100644 (file)
@@ -1,7 +1,15 @@
 --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
 
index 16e9c0d38ca4c6f29f185cc09454a9fb022baacb..1a8f782c2adb6c62ffebd99eb8985d334d4990ce 100644 (file)
@@ -1,7 +1,15 @@
 --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
 
index 3d63fbb7620674844d1575232379d2c5d21aad1d..34e30858e39bcc3c136cbed2652112a7dec4a81a 100644 (file)
@@ -1,7 +1,15 @@
 --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
 
index 6cef39c5679af2e62bf27ebadab3827c36f21486..23daa08f815e1dde51d90baa63259d70d1a553c8 100644 (file)
@@ -1,7 +1,15 @@
 --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
 
index 4dcb8e86127178a9b7193e6de24b0df7dbeca294..a89101b4992fcf77a2bc493d1e3c91aa0ab726a4 100644 (file)
@@ -1,7 +1,15 @@
 --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
 
index 4fb01caf4ebca6992d9d2239ffeff751c94d212c..99157baceb9dcd15588eee6c0233c8caf53e612d 100644 (file)
@@ -1,7 +1,15 @@
 --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
 
index 3323991b20cdd2d98c5504a890f312c5c9bd9850..3138aed00935ea24fdf09b921d3ce0f92d4ba46e 100644 (file)
@@ -1,7 +1,15 @@
 --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
 
index 452976e8fe4577dfc3ee51e31bc45828d8a3f8e0..8a116290e7e215ad0c38cd0efc55847d87da404e 100644 (file)
@@ -2,29 +2,17 @@
 
 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";
+}
 
 ?>
index a0ff731b5801da61bed6020b04b945c94ea56470..deed632eafc1246609be9e598b54be61bf5b7405 100644 (file)
@@ -1,11 +1,20 @@
 --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);
 
@@ -20,14 +29,33 @@ echo "Done\n";
 
 ?>
 --EXPECTF--
-OCI8 DEBUG L1: Got a cached connection: (%s) at (%s:%d) 
-Done
+OCI8 DEBUG: OCINlsEnvironmentVariableGet at (%s:%d) 
+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
index 226ab359de8bd6321cc1bb74763da13222856813..9e8377c43c03c5431496158c056e9e6169338d8e 100644 (file)
@@ -33,9 +33,17 @@ if (false !== getenv('PHP_OCI8_TEST_DB')) {
 } 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 = '';
+
 ?>