diff options
author | Christopher Jones <sixd@php.net> | 2010-11-10 18:59:56 +0000 |
---|---|---|
committer | Christopher Jones <sixd@php.net> | 2010-11-10 18:59:56 +0000 |
commit | eba1db126c0af4413eb08cfbe29ba5ce953baf33 (patch) | |
tree | 5c238effc923ed239fb823d4d40b53ad50716c23 | |
parent | b2b1a530315b80a62258418971323bd76bef52ad (diff) | |
download | php-git-eba1db126c0af4413eb08cfbe29ba5ce953baf33.tar.gz |
Improve startup failure error messages
-rw-r--r-- | ext/oci8/oci8.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index f952115bbb..19026a082e 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -1040,6 +1040,12 @@ static void php_oci_init_global_handles(TSRMLS_D) #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; |