From: Christopher Jones Date: Fri, 25 Jun 2010 21:09:13 +0000 (+0000) Subject: Fix bug #52186 (phpinfo shows 10.1 or 11.1 when installed with ORACLE_HOME 10.2 or... X-Git-Tag: php-5.4.0alpha1~191^2~1246 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b50c9a61024509918f9a7bfc217f596e94f45422;p=php Fix bug #52186 (phpinfo shows 10.1 or 11.1 when installed with ORACLE_HOME 10.2 or 11.2) --- diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 86bc2d46dc..38a69100f4 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -1300,19 +1300,26 @@ PHP_MINFO_FUNCTION(oci) snprintf(buf, sizeof(buf), "%ld", OCI_G(num_links)); php_info_print_table_row(2, "Active Connections", buf); -#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); +#if defined(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 -#ifdef PHP_OCI8_DEF_DIR + +#if !defined(PHP_WIN32) && !defined(HAVE_OCI_INSTANT_CLIENT) +#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");