I have some PHP CLI scripts that run for a long time (24 hours plus) and although they are regularly 'Commits I have some problems with orphan transactions - possibly due to the crash of the script.
My solution was to do the following transactions - it was a year ago that I researched it and the exact reasons for these settings can not be greatly missed, but it can solve some problems with the database seemed to.
$ dbh = ibase_connect ($ dbhost, $ dbuser, $ dbpass); $ Trans = ibase_trans (IBASE_WRITE + IBASE_COMMITTED + IBASE_REC_VERSION + IBASE_WAIT, $ dbh);
Now upgraded to 5.3.5 PHP and it has been found that the ibase_trans line generates a split error. There is a note on the Php ibase_trans page:
"The behavior of this function has been changed to PHP 5.0.0. The first call on Ibase_trans () will not return the default transaction of a connection."
So my question is whether can I set transaction arguments for default transaction ... secondary question, whether I am missing the point completely in trying to do this anyway I am!
Thank you
You should not work with default transactions.
Define your transaction as folows: $ T = ibase_trans ($ params, $ databases);
After running your query:
ibase_query ($ T, $ SQL, $ param) or You can use ibase_prepare & amp; Ibase_execute
After this, call
ibase_commit_ret ($ T); // This Guideline transaction activated or
ibase_commit ($ T) // This work-off transaction
Comments
Post a Comment