From: Antony Dovgal Date: Tue, 7 Mar 2006 07:47:43 +0000 (+0000) Subject: MFH X-Git-Tag: php-5.1.3RC1~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ce1f439026af8bc431020c0c8a8b15d98d698a0;p=php MFH add workaround for Oracle server crash, use OCIServerVersion() instead of OCIPing() fix #36250 (PHP Causes ORA-07445 Core dump in Oracle server 9.2.x) --- diff --git a/NEWS b/NEWS index bc8daf868e..07dccee786 100644 --- a/NEWS +++ b/NEWS @@ -92,6 +92,8 @@ PHP NEWS - Fixed bug #36283 (SOAPClient Compression Broken). (Dmitry) - Fixed bug #36268 (Object destructors called even after fatal errors). (Dmitry) - Fixed bug #36258 (SplFileObject::getPath() may lead to segfault). (Tony) +- Fixed bug #36250 (PHP causes ORA-07445 core dump in Oracle server 9.2.x). + (Tony) - Fixed bug #36242 (Possible memory corruption in stream_select()). (Tony) - Fixed bug #36235 (ocicolumnname returns false before a succesfull fetch). (Tony) diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 2d9469d81d..3b078b4617 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -988,7 +988,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char smart_str_appends_ex(&hashed_details, charset, 1); } else { - size_t rsize; + size_t rsize = 0; PHP_OCI_CALL(OCINlsEnvironmentVariableGet, (&charsetid, 2, OCI_NLS_CHARSET_ID, 0, &rsize)); smart_str_append_unsigned_ex(&hashed_details, charsetid, 0); @@ -1347,8 +1347,8 @@ open: * Ping connection. Uses OCIPing() or OCIServerVersion() depending on the Oracle Client version */ static int php_oci_connection_ping(php_oci_connection *connection TSRMLS_DC) { -#if OCI_MAJOR_VERSION >= 10 && OCI_MINOR_VERSION >= 2 - /* OCIPing() is usable only in 10.2 */ + /* OCIPing() crashes Oracle servers older than 10.2 */ +#if 0 OCI_G(errcode) = PHP_OCI_CALL(OCIPing, (connection->svc, OCI_G(err), OCI_DEFAULT)); #else char version[256];