#35322 [Asn->Csd]: oci_connect() after oci_close() gives unknown resource

From: Date: Thu, 24 Nov 2005 15:16:05 +0000
Subject: #35322 [Asn->Csd]: oci_connect() after oci_close() gives unknown resource
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-88853@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: Assigned +Status: Closed Bug Type: OCI8 related Operating System: * PHP Version: 5CVS-2005-11-23 (snap) Assigned To: tony2001 New Comment: This bug has been fixed in CVS. 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/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-11-23 07:16:57] cjbj at hotmail dot com I have emailed Antony a little trace info. ------------------------------------------------------------------------ [2005-11-22 13:24:00] tony2001@php.net Thanks. That would be very much appreciated. ------------------------------------------------------------------------ [2005-11-22 13:22:26] cjbj at hotmail dot com Reproduced on Windows with 5.1.0RC7-dev (Nov 22 2005 08:23:50) with matching OCI8 1.1 DLL. I'll check Linux tomorrow and see if I can get some debug info. ------------------------------------------------------------------------ [2005-11-22 11:52:29] tony2001@php.net Work fine here, with latest OCI8 from CVS. ------------------------------------------------------------------------ [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

« previous php.bugs (#88853) next »