#35322 [NEW]: oci_connect after oci_close gives unknown resource
From: cjbj at hotmail dot com
Operating system: Linux
PHP version: 5.0.5
PHP Bug Type: OCI8 related
Bug description: oci_connect after oci_close gives unknown resource
Description:
------------
The call sequence
oci_connect
oci_close
oci_connect
returns an unknown resource.
Reproduced on Linux with Zend Core for Oracle (PHP 5.0.5)
Reproduced on Windows with PHP 5.0.6-dev Nov 3 2005 18:23:25 using OCI8
1.1 php_oci.dll downloaded from
http://pecl4win.php.net/ext.php/php_oci8.dll
on Nov 4.
The problem is possibly related to http://bugs.php.net/bug.php?id=35205
Reproduce code:
---------------
<?php
$user = "hr";
$pass = "hr";
$databaseName = "//localhost/XE";
echo "<pre>"; var_dump($user, $pass, $databaseName); echo "</pre>";
$conn = oci_connect( $user, $pass, $databaseName);
echo "<pre>"; var_dump($conn); echo "</pre>";
if (!$conn) {
echo "connection 1 failed";
exit;
}
oci_close($conn);
$conn = oci_connect( $user, $pass, $databaseName);
echo "<pre>"; var_dump($conn); echo "</pre>";
if (!$conn) {
echo "connection 2 failed";
exit;
}
oci_close($conn);
?>
Expected result:
----------------
string(2) "hr"
string(2) "hr"
string(14) "//localhost/XE"
resource(2) of type (oci8 connection)
resource(2) of type (oci8 connection)
Actual result:
--------------
string(2) "hr"
string(2) "hr"
string(14) "//localhost/XE"
resource(2) of type (oci8 connection)
resource(2) of type (Unknown)
Warning: oci_close(): 2 is not a valid oci8 connection resource in
/home/cj/public_html/php/t1.php on line 29
--
Edit bug report at http://bugs.php.net/?id=35322&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35322&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35322&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35322&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35322&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35322&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35322&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35322&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35322&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35322&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35322&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35322&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35322&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35322&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35322&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35322&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35322&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35322&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35322&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35322&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35322&r=mysqlcfg
Thread (8 messages)
- cjbj at hotmail dot com