ID: 16132
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Closed
Bug Type: ODBC related
Operating System: Win2k
PHP Version: 4.1.2
New Comment:
This bug has been fixed in CVS.
Thanks for your report.
Previous Comments:
------------------------------------------------------------------------
[2002-03-18 00:58:19] [EMAIL PROTECTED]
The code in php_odbc.c, that checks if a persistent connections still
alive, when finds a bad connection will try to deallocate the
connection twice causing Access Violation in SQLServer ODBC driver
zend_hash_del will make a call to _close_odbc_connection
through destruction process.
safe_odbc_disconnect(db_conn->hdbc);
SQLFreeConnect(db_conn->hdbc);
Aren't nessessary here and will cause Access Violation in SQLServer
driver.
Line 2125 in php_odbc.c
if(ODBCG(check_persistent)){
RETCODE ret;
UCHAR d_name[32];
SWORD len;
ret = SQLGetInfo(db_conn->hdbc, SQL_DATA_SOURCE_READ_ONLY, d_name,
sizeof(d_name), &len);
if(ret != SQL_SUCCESS || len == 0) {
zend_hash_del(&EG(persistent_list), hashed_details, hashed_len + 1);
safe_odbc_disconnect(db_conn->hdbc);
SQLFreeConnect(db_conn->hdbc);
goto try_and_get_another_connection;
}
}
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16132&edit=1