svn: /php/php-src/ branches/PHP_5_3/ext/oci8/oci8.c trunk/ext/oci8/oci8.c
| From: | Christopher Jones | Date: | Wed, 10 Nov 2010 18:59:56 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/oci8/oci8.c trunk/ext/oci8/oci8.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-63795@lists.php.net to get a copy of this message | ||
sixd Wed, 10 Nov 2010 18:59:56 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=305257
Log:
Improve startup failure error messages
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.c 2010-11-10 18:49:55 UTC (rev 305256)
+++ php/php-src/branches/PHP_5_3/ext/oci8/oci8.c 2010-11-10 18:59:56 UTC (rev 305257)
@@ -1040,6 +1040,12 @@
#else
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
+ if (OCI_G(env)
+ && OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf,
(ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS
+ && *tmp_buf) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", tmp_buf);
+ }
+
OCI_G(env) = NULL;
OCI_G(err) = NULL;
return;
Modified: php/php-src/trunk/ext/oci8/oci8.c
===================================================================
--- php/php-src/trunk/ext/oci8/oci8.c 2010-11-10 18:49:55 UTC (rev 305256)
+++ php/php-src/trunk/ext/oci8/oci8.c 2010-11-10 18:59:56 UTC (rev 305257)
@@ -1040,6 +1040,12 @@
#else
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
+ if (OCI_G(env)
+ && OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf,
(ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS
+ && *tmp_buf) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", tmp_buf);
+ }
+
OCI_G(env) = NULL;
OCI_G(err) = NULL;
return;