]> granicus.if.org Git - php/commitdiff
MFH
authorAntony Dovgal <tony2001@php.net>
Tue, 7 Mar 2006 07:47:43 +0000 (07:47 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 7 Mar 2006 07:47:43 +0000 (07:47 +0000)
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)

NEWS
ext/oci8/oci8.c

diff --git a/NEWS b/NEWS
index bc8daf868ef0bc0133a00ca6372c8f95440d3caa..07dccee786aa240c5290d2caa3d9d4e7160a4b54 100644 (file)
--- 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)
index 2d9469d81dd57b480c37a9dd296e7f90eec4e762..3b078b4617ac67b67c4889b245e2a6f25f18a16a 100644 (file)
@@ -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];