sixd Mon Mar 16 05:34:02 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/oci8 oci8.c
/php-src/ext/oci8/tests connect_without_oracle_home.phpt
connect_without_oracle_home_old.phpt
pecl_bug16035.phpt
Log:
MFH: Mac OSX customization for initialization error message
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8.c?r1=1.269.2.16.2.38.2.31&r2=1.269.2.16.2.38.2.32&diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.269.2.16.2.38.2.31
php-src/ext/oci8/oci8.c:1.269.2.16.2.38.2.32
--- php-src/ext/oci8/oci8.c:1.269.2.16.2.38.2.31 Mon Mar 9 20:09:07 2009
+++ php-src/ext/oci8/oci8.c Mon Mar 16 05:34:02 2009
@@ -26,7 +26,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c,v 1.269.2.16.2.38.2.31 2009/03/09 20:09:07 sixd Exp $ */
+/* $Id: oci8.c,v 1.269.2.16.2.38.2.32 2009/03/16 05:34:02 sixd Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -63,6 +63,16 @@
#define Z_ADDREF_P(x) ZVAL_ADDREF(x)
#endif
+/* For a user friendly message about environment setup */
+/* TODO: add cases for SHLIB_PATH, LIBPATH, LD_LIBRARY_PATH_64 etc */
+#if defined(PHP_WIN32)
+#define PHP_OCI8_LIB_PATH_MSG "PATH"
+#elif defined(__APPLE__)
+#define PHP_OCI8_LIB_PATH_MSG "DYLD_LIBRARY_PATH"
+#else
+#define PHP_OCI8_LIB_PATH_MSG "LD_LIBRARY_PATH"
+#endif
+
/* True globals, no need for thread safety */
int le_connection;
int le_pconnection;
@@ -987,13 +997,9 @@
if (errstatus == OCI_ERROR) {
#ifdef HAVE_OCI_INSTANT_CLIENT
-# ifdef PHP_WIN32
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that PATH
includes the directory with Oracle Instant Client libraries");
-# else
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries");
-# endif
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that "
PHP_OCI8_LIB_PATH_MSG " includes the directory with Oracle Instant Client
libraries");
#else
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
ORACLE_HOME and " PHP_OCI8_LIB_PATH_MSG " are set and point to the right
directories");
#endif
OCI_G(env) = NULL;
OCI_G(err) = NULL;
@@ -1242,7 +1248,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
php_info_print_table_row(2, "Version", PHP_OCI8_VERSION);
- php_info_print_table_row(2, "Revision", "$Revision:
1.269.2.16.2.38.2.31 $");
+ php_info_print_table_row(2, "Revision", "$Revision:
1.269.2.16.2.38.2.32 $");
snprintf(buf, sizeof(buf), "%ld", OCI_G(num_persistent));
php_info_print_table_row(2, "Active Persistent Connections", buf);
@@ -2703,13 +2709,9 @@
if (OCI_G(errcode) != OCI_SUCCESS) {
#ifdef HAVE_OCI_INSTANT_CLIENT
-# ifdef PHP_WIN32
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that PATH
includes the directory with Oracle Instant Client libraries");
-# else
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries");
-# endif
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that "
PHP_OCI8_LIB_PATH_MSG " includes the directory with Oracle Instant Client
libraries");
#else
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
ORACLE_HOME and " PHP_OCI8_LIB_PATH_MSG " are set and point to the right
directories");
#endif
return NULL;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/connect_without_oracle_home.phpt?r1=1.1.2.2.2.1.2.2&r2=1.1.2.2.2.1.2.3&diff_format=u
Index: php-src/ext/oci8/tests/connect_without_oracle_home.phpt
diff -u php-src/ext/oci8/tests/connect_without_oracle_home.phpt:1.1.2.2.2.1.2.2
php-src/ext/oci8/tests/connect_without_oracle_home.phpt:1.1.2.2.2.1.2.3
--- php-src/ext/oci8/tests/connect_without_oracle_home.phpt:1.1.2.2.2.1.2.2
Thu Mar 12 14:50:29 2009
+++ php-src/ext/oci8/tests/connect_without_oracle_home.phpt Mon Mar 16
05:34:02 2009
@@ -29,6 +29,6 @@
===DONE===
<?php exit(0); ?>
--EXPECTF--
-Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong
with your system - please check that ORACLE_HOME is set and points to the right
directory in %s on line %d
+Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong
with your system - please check that ORACLE_HOME and %s are set and point to
the right directories in %s on line %d
bool(false)
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/connect_without_oracle_home_old.phpt?r1=1.1.2.2.2.1.2.2&r2=1.1.2.2.2.1.2.3&diff_format=u
Index: php-src/ext/oci8/tests/connect_without_oracle_home_old.phpt
diff -u
php-src/ext/oci8/tests/connect_without_oracle_home_old.phpt:1.1.2.2.2.1.2.2
php-src/ext/oci8/tests/connect_without_oracle_home_old.phpt:1.1.2.2.2.1.2.3
--- php-src/ext/oci8/tests/connect_without_oracle_home_old.phpt:1.1.2.2.2.1.2.2
Thu Mar 12 14:50:29 2009
+++ php-src/ext/oci8/tests/connect_without_oracle_home_old.phpt Mon Mar 16
05:34:02 2009
@@ -29,6 +29,6 @@
===DONE===
<?php exit(0); ?>
--EXPECTF--
-Warning: ocilogon(): OCIEnvNlsCreate() failed. There is something wrong with
your system - please check that ORACLE_HOME is set and points to the right
directory in %s on line %d
+Warning: ocilogon(): OCIEnvNlsCreate() failed. There is something wrong with
your system - please check that ORACLE_HOME and %s are set and point to the
right directories in %s on line %d
bool(false)
===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/pecl_bug16035.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u
Index: php-src/ext/oci8/tests/pecl_bug16035.phpt
diff -u php-src/ext/oci8/tests/pecl_bug16035.phpt:1.1.2.3
php-src/ext/oci8/tests/pecl_bug16035.phpt:1.1.2.4
--- php-src/ext/oci8/tests/pecl_bug16035.phpt:1.1.2.3 Thu Mar 12 14:50:29 2009
+++ php-src/ext/oci8/tests/pecl_bug16035.phpt Mon Mar 16 05:34:02 2009
@@ -22,5 +22,5 @@
===DONE===
<?php exit(0); ?>
--EXPECTF--
-Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong
with your system - please check that ORACLE_HOME is set and points to the right
directory in %s on line %d
+Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong
with your system - please check that ORACLE_HOME and %s are set and point to
the right directories in %s on line %d
===DONE===
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php