]> granicus.if.org Git - php/commitdiff
Improve startup failure error messages
authorChristopher Jones <sixd@php.net>
Wed, 10 Nov 2010 18:59:56 +0000 (18:59 +0000)
committerChristopher Jones <sixd@php.net>
Wed, 10 Nov 2010 18:59:56 +0000 (18:59 +0000)
ext/oci8/oci8.c

index 1be6315eefd52656cfb55dda77f059f0e57f9849..49a9b5710a4e9b04f253b201337245edce42d1f0 100644 (file)
@@ -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;