summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-03-07 07:47:43 +0000
committerAntony Dovgal <tony2001@php.net>2006-03-07 07:47:43 +0000
commit6ce1f439026af8bc431020c0c8a8b15d98d698a0 (patch)
tree3c0effe977ad9fb341c79fe6a60bb951b542fd96
parent3563191049dd0b00bcafc0738a0c2c1a2026ee00 (diff)
downloadphp-git-6ce1f439026af8bc431020c0c8a8b15d98d698a0.tar.gz
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)
-rw-r--r--NEWS2
-rw-r--r--ext/oci8/oci8.c6
2 files changed, 5 insertions, 3 deletions
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];