|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12038 problem with closing database handles
Submitted: 2001-07-11 04:25 UTC Modified: 2002-07-01 07:15 UTC
From: kirill at mns dot ru Assigned:
Status: Not a bug Package: InterBase related
PHP Version: 4.0.6 OS: RedHat 7.1
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:
Solve the problem:
35 - 34 = ?
Subscribe to this entry?

 [2001-07-11 04:25 UTC] kirill at mns dot ru
PHP reports warning about invalid statement handle after I
use ibase_close() to close opened with ipbase_connect()
database connection. If I comment ibase_close that removes
this warning (all this code must be in function to get
warning,in plain use - there are no warnings in any case). I
think that it's a bug in cleanup code at shutdown.

function first_connect(){
    $dbh =
"login","password", none, 100, 3, "role"); 
    if (!$dbh)
        echo "An error occured while connecting!!!\n";
        $username = "KIRILL";
        $qry = "SELECT * FROM GETUSERROLE('$username')";
        $sth = ibase_query ($dbh, $qry);
        while ($row = ibase_fetch_object ($sth)){}

 './configure' '--prefix=/usr'
'--with-config-file-path=/etc' '--disable-debug'
'--enable-pic' '--enable-shared'
'--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs'
'--with-exec-dir=/usr/bin' '--with-regex=system'
'--with-gettext' '--with-gd' '--with-jpeg-dir=/usr'
'--with-png' '--with-zlib' '--with-db2' '--with-gdbm'
'--enable-debugger' '--enable-magic-quotes'
'--enable-safe-mode' '--enable-sockets' '--enable-sysvsem'
'--enable-sysvshm' '--enable-track-vars' '--enable-yp'
'--enable-ftp' '--enable-wddx' '--without-mysql'
'--without-oracle' '--without-oci8' '--with-xml'
'--with-mod_charset' '--without-pgsql' '--without-interbase'
'--without-recode' '--without-mhash' '--without-sablot'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-11 04:26 UTC] kirill at mns dot ru
Here is warning for sample code:
Warning: InterBase: invalid statement handle in
/var/www/users/kirill/bug.php on line 2
 [2002-07-01 06:22 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

 [2002-07-01 07:15 UTC]
Better try the CVS snapshots as there have been few
fixes in CVS for interbase..

 [2004-08-30 09:58 UTC] dennis at benade dot co dot za
I had exactly the same problem and got it to work by using:


This solved the problem for me.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Oct 04 03:05:53 2022 UTC