Subject | RE: [firebird-php] isc_detach_database issues |
---|---|
Author | Nigel Weeks |
Post date | 2007-03-01T00:41:32Z |
Nup, just confirmed that everything is committed, released, or freed.
I'll re-engineer my app in the short term to get around this issue, and if I
get time, I'll do some trawling through the old Interbase docs.
Nige
_____
From: firebird-php@yahoogroups.com [mailto:firebird-php@yahoogroups.com] On
Behalf Of Helen Borrie
Sent: Thursday, 1 March 2007 11:14 AM
To: firebird-php@yahoogroups.com
Subject: Re: [firebird-php] isc_detach_database issues
At 09:54 AM 1/03/2007, you wrote:
committed or rolled back before calling isc_detach_database(). The
code sequence above doesn't seem to handle the case where a commit
can't happen and a rollback is required instead (but maybe the
rollback case is actually covered in the _php_ibase_commit_link() call).
For displaying error messages, try to find something that calls
isc_print_sqlerror() and isc_sql_interprete() - yes, it really is
spelt that way - or, in Fb 2, fb_interpret().
Do you have a copy of the IB 6.0 ApiGuide.pdf?
finish. If the application code doesn't take care of it, about all
that's left is for the client to be recognised as abandoned. That
won't happen until after the prescribed keepalive timeout (2 hrs by
default or whatever you have it set to in your TCP configuration),
whereupon the logical connection would be considered
"dead". Eventually the dead transactions would be rolled back by the
engine and the mud would settle.
Helen
__________ NOD32 2085 (20070228) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
[Non-text portions of this message have been removed]
I'll re-engineer my app in the short term to get around this issue, and if I
get time, I'll do some trawling through the old Interbase docs.
Nige
_____
From: firebird-php@yahoogroups.com [mailto:firebird-php@yahoogroups.com] On
Behalf Of Helen Borrie
Sent: Thursday, 1 March 2007 11:14 AM
To: firebird-php@yahoogroups.com
Subject: Re: [firebird-php] isc_detach_database issues
At 09:54 AM 1/03/2007, you wrote:
>I have a situation with PHP (hence the post to firebird-php) wherefailing
>ibase_close() is failing to close the specified connection, and it's
>silently, not returning any error messages as to my the close failed.false(nestled
>
>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
>directly inside IF statements), so I presume if it failed, there's anotherTransactions associated with the connection need to be either
>function I can call to get any error text, like ERREXIT(status, 1), or
>something...
committed or rolled back before calling isc_detach_database(). The
code sequence above doesn't seem to handle the case where a commit
can't happen and a rollback is required instead (but maybe the
rollback case is actually covered in the _php_ibase_commit_link() call).
For displaying error messages, try to find something that calls
isc_print_sqlerror() and isc_sql_interprete() - yes, it really is
spelt that way - or, in Fb 2, fb_interpret().
Do you have a copy of the IB 6.0 ApiGuide.pdf?
>Basically, I'd like to patch PHP5.2.1 to actually return any error codesIt's possibly not "dying silently" but waiting for transactions to
>from the detach process, instead of it dying silently...
finish. If the application code doesn't take care of it, about all
that's left is for the client to be recognised as abandoned. That
won't happen until after the prescribed keepalive timeout (2 hrs by
default or whatever you have it set to in your TCP configuration),
whereupon the logical connection would be considered
"dead". Eventually the dead transactions would be rolled back by the
engine and the mud would settle.
Helen
__________ NOD32 2085 (20070228) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
[Non-text portions of this message have been removed]