Subject isc_detach_database issues
Author Nigel Weeks
I have a situation with PHP (hence the post to firebird-php) where
ibase_close() is failing to close the specified connection, and it's failing
silently, not returning any error messages as to my the close failed.

Peering inside the source, it calls isc_detach_database (hence the post to
firebird-support), but I'm having trouble finding the declaration for the
isc_detach_database.

The source inside PHP5.2.1 merely does the following:
======================

static void _php_ibase_close_link(zend_rsrc_list_entry *rsrc TSRMLS_DC) /*
{{{ *
/
{
ibase_db_link *link = (ibase_db_link *) rsrc->ptr;

_php_ibase_commit_link(link TSRMLS_CC);
if (link->handle != NULL) {
IBDEBUG("Closing normal link...");
isc_detach_database(IB_STATUS, &link->handle);
}
IBG(num_links)--;
efree(link);
}
/* }}} */

===============


>From it's usage around the place, it appears to return true or false(nestled
directly inside IF statements), so I presume if it failed, there's another
function I can call to get any error text, like ERREXIT(status, 1), or
something...



Basically, I'd like to patch PHP5.2.1 to actually return any error codes
from the detach process, instead of it dying silently...

Nige




[Non-text portions of this message have been removed]