Bug #12038: problem with closing database handles
| From: | kirill at mns dot ru | Date: | Wed, 11 Jul 2001 08:25:14 +0000 |
| Subject: | Bug #12038: problem with closing database handles | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-59664@lists.php.net to get a copy of this message | ||
From: kirill@mns.ru
Operating system: RedHat 7.1
PHP version: 4.0.6
PHP Bug Type: InterBase related
Bug description: problem with closing database handles
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.
<?
first_connect();
function first_connect(){
$dbh =
ibase_connect("localhost:/usr/interbase/data/db.gdb",
"login","password", none, 100, 3, "role");
if (!$dbh)
{
echo "An error occured while connecting!!!\n";
exit;
}
else
{
$username = "KIRILL";
$qry = "SELECT * FROM GETUSERROLE('$username')";
$sth = ibase_query ($dbh, $qry);
while ($row = ibase_fetch_object ($sth)){}
ibase_close($dbh);
}
}
?>
'./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'
--
Edit bug report at: http://bugs.php.net/?id=12038&edit=1