#35322 [Fbk]: oci_connect after oci_close gives unknown resource
| From: | tony2001@php.net | Date: | Tue, 22 Nov 2005 10:52:30 +0000 |
| Subject: | #35322 [Fbk]: oci_connect after oci_close gives unknown resource | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-88674@lists.php.net to get a copy of this message | ||
ID: 35322
Updated by: tony2001@php.net
Reported By: cjbj at hotmail dot com
Status: Feedback
Bug Type: OCI8 related
Operating System: Linux
PHP Version: 5.0.5
New Comment:
Work fine here, with latest OCI8 from CVS.
Previous Comments:
------------------------------------------------------------------------
[2005-11-22 09:15:24] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-11-22 08:03:51] cjbj at hotmail dot com
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 this bug report at http://bugs.php.net/?id=35322&edit=1