sixd Fri, 25 Jun 2010 21:09:13 +
Revision: http://svn.php.net/viewvc?view=revisionrevision=300752
Log:
Fix bug #52186 (phpinfo shows 10.1 or 11.1 when installed with ORACLE_HOME 10.2
or 11.2)
Bug: http://bugs.php.net/52186 (Assigned) phpinfo() shows 10.1 or 11.1 when
installed with ORACLE_HOME 10.2 or 11.2
Changed paths:
U php/php-src/branches/PHP_5_3/ext/oci8/oci8.c
U php/php-src/trunk/ext/oci8/oci8.c
Modified: php/php-src/branches/PHP_5_3/ext/oci8/oci8.c
===
--- php/php-src/branches/PHP_5_3/ext/oci8/oci8.c2010-06-25 18:23:54 UTC
(rev 300751)
+++ php/php-src/branches/PHP_5_3/ext/oci8/oci8.c2010-06-25 21:09:13 UTC
(rev 300752)
@@ -1300,19 +1300,26 @@
snprintf(buf, sizeof(buf), %ld, OCI_G(num_links));
php_info_print_table_row(2, Active Connections, buf);
+#ifdefined(OCI_MAJOR_VERSION) defined(OCI_MINOR_VERSION)
+ snprintf(buf, sizeof(buf), %d.%d, OCI_MAJOR_VERSION,
OCI_MINOR_VERSION);
+#elif defined(PHP_OCI8_ORACLE_VERSION)
+ snprintf(buf, sizeof(buf), %s, PHP_OCI8_ORACLE_VERSION);
+#else
+ snprintf(buf, sizeof(buf), Unknown);
+#endif
+#if defined(HAVE_OCI_INSTANT_CLIENT)
+ php_info_print_table_row(2, Oracle Instant Client Version, buf);
+#else
+ php_info_print_table_row(2, Oracle Version, buf);
+#endif
+
#if !defined(PHP_WIN32) !defined(HAVE_OCI_INSTANT_CLIENT)
-#ifdef PHP_OCI8_ORACLE_VERSION
- php_info_print_table_row(2, Oracle Version, PHP_OCI8_ORACLE_VERSION);
-#endif
-#ifdef PHP_OCI8_DEF_DIR
+#if defined(PHP_OCI8_DEF_DIR)
php_info_print_table_row(2, Compile-time ORACLE_HOME,
PHP_OCI8_DEF_DIR);
#endif
-#ifdef PHP_OCI8_DEF_SHARED_LIBADD
+#if defined(PHP_OCI8_DEF_SHARED_LIBADD)
php_info_print_table_row(2, Libraries Used,
PHP_OCI8_DEF_SHARED_LIBADD);
#endif
-#elif defined(HAVE_OCI_INSTANT_CLIENT) defined(OCI_MAJOR_VERSION)
defined(OCI_MINOR_VERSION)
- snprintf(buf, sizeof(buf), %d.%d, OCI_MAJOR_VERSION,
OCI_MINOR_VERSION);
- php_info_print_table_row(2, Oracle Instant Client Version, buf);
#endif
php_info_print_table_row(2, Temporary Lob support, enabled);
Modified: php/php-src/trunk/ext/oci8/oci8.c
===
--- php/php-src/trunk/ext/oci8/oci8.c 2010-06-25 18:23:54 UTC (rev 300751)
+++ php/php-src/trunk/ext/oci8/oci8.c 2010-06-25 21:09:13 UTC (rev 300752)
@@ -1300,19 +1300,26 @@
snprintf(buf, sizeof(buf), %ld, OCI_G(num_links));
php_info_print_table_row(2, Active Connections, buf);
+#ifdefined(OCI_MAJOR_VERSION) defined(OCI_MINOR_VERSION)
+ snprintf(buf, sizeof(buf), %d.%d, OCI_MAJOR_VERSION,
OCI_MINOR_VERSION);
+#elif defined(PHP_OCI8_ORACLE_VERSION)
+ snprintf(buf, sizeof(buf), %s, PHP_OCI8_ORACLE_VERSION);
+#else
+ snprintf(buf, sizeof(buf), Unknown);
+#endif
+#if defined(HAVE_OCI_INSTANT_CLIENT)
+ php_info_print_table_row(2, Oracle Instant Client Version, buf);
+#else
+ php_info_print_table_row(2, Oracle Version, buf);
+#endif
+
#if !defined(PHP_WIN32) !defined(HAVE_OCI_INSTANT_CLIENT)
-#ifdef PHP_OCI8_ORACLE_VERSION
- php_info_print_table_row(2, Oracle Version, PHP_OCI8_ORACLE_VERSION);
-#endif
-#ifdef PHP_OCI8_DEF_DIR
+#if defined(PHP_OCI8_DEF_DIR)
php_info_print_table_row(2, Compile-time ORACLE_HOME,
PHP_OCI8_DEF_DIR);
#endif
-#ifdef PHP_OCI8_DEF_SHARED_LIBADD
+#if defined(PHP_OCI8_DEF_SHARED_LIBADD)
php_info_print_table_row(2, Libraries Used,
PHP_OCI8_DEF_SHARED_LIBADD);
#endif
-#elif defined(HAVE_OCI_INSTANT_CLIENT) defined(OCI_MAJOR_VERSION)
defined(OCI_MINOR_VERSION)
- snprintf(buf, sizeof(buf), %d.%d, OCI_MAJOR_VERSION,
OCI_MINOR_VERSION);
- php_info_print_table_row(2, Oracle Instant Client Version, buf);
#endif
php_info_print_table_row(2, Temporary Lob support, enabled);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php