php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8142 on exit() from method, interbase makes a mess with transaction ids
Submitted: 2000-12-06 16:40 UTC Modified: 2003-08-16 11:18 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: hp at oeri dot ch Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.0.3pl1 OS: Linux 2.2.17
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
17 - 13 = ?
Subscribe to this entry?

 
 [2000-12-06 16:40 UTC] hp at oeri dot ch
If I exit() or die() from within a method, a begun transaction is automatically COMMITTED(!) and I get wierd errors in the http error log.

<?
    class InterBaseFailure {
 
    var $dbh;
    var $trh;
 
    function InterBaseFailure() {
        $this->dbh = ibase_pconnect( "ibase/outerdb.gdb", "web", "pass" );
        $this->trh = ibase_trans( IBASE_DEFAULT, $this->dbh );
    }
 
    function Save( $num ) {
        ibase_query( $this->trh,  "insert into dummy values ($num)" );
 
        // now, if we exit() from here either directly or indirectly
        // there's a mess with the transaction handles. I get:
        // a) an error in the httpd log
        //    "x is not a valid InterBase link resource
        // b) A COMMITTED CHANGE!!!!!
        exit();
    }
    }
 
    $t = New InterBaseFailure();
    $t->Save( 3 );
 
?> 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-11 16:53 UTC] lobbin@php.net
Do you still experience this problem on PHP 4.1.1?
 [2002-02-02 06:41 UTC] sander@php.net
No feedback was provided for this bug, so it is being suspended.
If you are able to provide the information that was requested,
please do so and change the status of the bug back to "Open".
 [2003-08-16 11:18 UTC] abies@php.net
This has been fixed in CVS HEAD. ibase_trans() no longer returns a handle to the default transaction, so transaction that were started explicitly are no longer implicitly committed.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat May 28 19:03:50 2022 UTC