php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7014 ibase_query (rest of php_interbase.dll?)
Submitted: 2000-10-04 10:29 UTC Modified: 2003-08-13 08:29 UTC
From: jccann at home dot com Assigned: jah (profile)
Status: Closed Package: InterBase related
PHP Version: 4.0.2 OS: NT 4.0 SP5
Private report: No CVE-ID: None
 [2000-10-04 10:29 UTC] jccann at home dot com
Environment:
  Binary distro of PHP 4.0.2
  NT 4.0 (SP5)
  Apache 1.3.2
  Interbase ISQL Version: WI-V6.0.0.627
  InterBase/x86/Windows NT (access method), 
  version "WI-  V6.0.0.627" on disk structure version 10.0

When I try to fetch a record using ibase_query that is encapsulated into a class, it does not work and I receive:

"Warning: InterBase: invalid transaction handle (expecting explicit transaction start) in c:\program files\apache group\apache\htdocs\ibasetest.php on line 30"

Run the following script to duplicate.  Note that if you comment lines 2-19 and 38-48, you will run the fetch without creating the object.  In this case (non-object), the fetch works.

BTW - The uncommented (i.e., object version) works great on my Linux box (PHP 4.0.0 + Interbase 6.0).

Thanks.
P.S. If you need interbase testing or test scripts, I would be happy to help.  The interbase DLL is *really* shaky in NT for PHP 4.0.2.

--------- IbaseTest.php -----------
<?php
/* Comment from here */
	include_once( 'Audit.php' );
	include_once( 'Form.php' );

class IbaseTest {

	function insert() {
		$sql = "INSERT INTO AUDITS ( AUDIT_ID, INSERT_USER, INSERT_DATE )
			VALUES ( GEN_ID( AUDIT_GEN, 1 ), 'IbaseTest', 'NOW' );";

		echo "instantiate IbaseTest()<br>";
		$form = new Form();
		echo "insertRecord()<br>";
		$form->insertRecord( $sql );
	}

	function fetch() {
/* to here to make this work (more comments below) */
		$sql = "SELECT MAX(AUDIT_ID) FROM AUDITS;";
		$dbServer = "localhost";
		$passwd = "x8fg73ca";
		$dbName = "C:\Program Files\BORLAND\InterBase\data\mut.gdb";
		$user = "mtnunion";
		$connect = $dbServer . ":" . $dbName;
		echo "connect<br>";
		$dbh = ibase_connect( $connect, $user, $passwd );
		echo "connection handle: $dbh<br>";
		echo "query<br>";
		$sth = ibase_query( $sql, $dbh );
		echo "fetch_row<br>";
		$row = ibase_fetch_row ( $sth );
		echo "free_result<br>";
		ibase_free_result( $sth );
		echo "close<br>";
		ibase_close( $dbh );
		echo "fetched id: $row[0]<br>";
/* comment to end of script */
	}
}

echo "instantiate IbaseTest()<br>";
$test = new IbaseTest();
echo "insert()<br>";
$test->insert();
echo "fetch()<br>";
$test->fetch();
/**/

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-27 23:44 UTC] jah@php.net
This is, I hope, fixed (can't test it because I don't have any Windows machine).You should fetch php4.0.4-dev for win32 from http://www.php4win.de.

Or if you would rather stay with a release version, php4.0.3 for win32 from
the same place and contact me (jah@php.net) directly for an updated version
of php_interbase.dll (thanks to Daniel Beulshausen for compiling it), there was
still one critical InterBase-related bug in 4.0.3.

 [2000-10-28 15:13 UTC] jccann at home dot com
Hi.

I tested the 4.0.4-dev release from www.php4win.de.
The bug I reported on NT 4.0 SP5 is fixed!  

Thank you!
 [2000-10-28 16:03 UTC] jccann at home dot com
Hi.  Although I reported that things were working there was one test I did not do and that is a commit.  Here is a simple example.  When I run this and try to commit, I get an exception in php.exe.  I can send other SQL statements, such as an insert and this same code works.

<?php    
    print "connect<br>";
    $dbServer = "localhost";
    $dbName = "C:\test.gdb";
    $user = "test";
    $passwd = "test";
    $connect = $dbServer . ":" . $dbName;
    $dbh = ibase_connect( $connect, $user, $passwd );

    print "commit<br>";
    $commit = ibase_prepare( "COMMIT;" );
    ibase_execute( $commit );
    ibase_free_query( $commit );

    print "disconnect<br>";
    ibase_close( $dbh );
?>
 [2000-11-27 08:17 UTC] jah@php.net
User reported this to be fixed.
 [2000-11-27 08:18 UTC] jah@php.net
Re-open. Didn't read all the comments...
 [2001-01-12 23:15 UTC] cynic@php.net
this is marked as assigned, but there's no one in the 'assign to' field. I guess this one belongs to jah, if not, reassign, please.

btw, I could probably test IB on NT 4/5 a bit, too.
 [2002-05-25 09:17 UTC] derick@php.net
Any news on this Jouni?
 [2003-04-28 11:40 UTC] wez@php.net
Looks like it will never get fixed.
 [2003-08-12 12:34 UTC] abies@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2003-08-12 18:48 UTC] sniper@php.net
Currently fixed only in PHP 5 branch, propably not going to be fixed in PHP 4 ever.

 [2003-08-13 08:29 UTC] abies@php.net
Fix will also be in final of 4.3.3
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 30 22:01:28 2024 UTC