diff options
author | Antony Dovgal <tony2001@php.net> | 2006-03-07 07:45:59 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-03-07 07:45:59 +0000 |
commit | af792fbcc2b469bb24b6d03812e207f2a8346a4d (patch) | |
tree | 09cd932b10b18f4c9007c006c3f47e9ce2e33424 | |
parent | 7453c27089a8e16931408167d32814fafaba3f6a (diff) | |
download | php-git-af792fbcc2b469bb24b6d03812e207f2a8346a4d.tar.gz |
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)
-rw-r--r-- | ext/oci8/oci8.c | 6 |
1 files changed, 3 insertions, 3 deletions
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]; |