From: Christopher Jones Date: Wed, 10 Nov 2010 18:59:56 +0000 (+0000) Subject: Improve startup failure error messages X-Git-Tag: php-5.3.4RC1~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29bdf308800005c01a2cbd987ec2788b3fcf470a;p=php Improve startup failure error messages --- diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 1be6315eef..49a9b5710a 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;