#11486 [Opn->Bgs]: Oracle connection resource disappears in nested connections
| From: | kalowsky@php.net | Date: | Sat, 17 Aug 2002 05:39:59 +0000 |
| Subject: | #11486 [Opn->Bgs]: Oracle connection resource disappears in nested connections | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17096@lists.php.net to get a copy of this message | ||
ID: 11486
Updated by: kalowsky@php.net
Reported By: alban.hertroys@ddnh.nl
-Status: Open
+Status: Bogus
Bug Type: Oracle related
Operating System: Debian Linux i686
PHP Version: 4.0.4pl1
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
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.
Previous Comments:
------------------------------------------------------------------------
[2001-06-14 09:13:25] alban.hertroys@ddnh.nl
If you do the following, the last ora_commit has a connection resource
of type "unknown". The connection is gone!
With PHP3 this worked, as a new connection resource was opened for
every ora_logon. In PHP4 the resource is being reused.
The ora_commit in the function is valid (type is "oracle link").
<?php
define("username", "xxx");
define("password", "xxx");
function func1() {
$conn = ora_logon(username, password);
if (! $conn) die ("No connection");
ora_commitoff($conn);
$curs = ora_open($conn);
ora_parse($curs, "SELECT 1 FROM dual");
ora_exec($curs);
ora_close($curs);
ora_commit($conn);
ora_logoff($conn);
}
$conn = ora_logon(username, password);
if (! $conn) die ("No connection");
ora_commitoff($conn);
func1();
func1();
$curs = ora_open($conn);
ora_parse($curs, "SELECT 1 FROM dual");
ora_exec($curs);
ora_close($curs);
ora_commit($conn);
ora_logoff($conn);
?>
This results in:
Warning: Connection already closed for cursor index 138323132 in
/home/alban/public_htdocs/test/nested_connections.php on line 28
Warning: Connection already closed for cursor index 138323132 in
/home/alban/public_htdocs/test/nested_connections.php on line 29
Warning: 1 is not a valid Oracle-Connection resource in
/home/alban/public_htdocs/test/nested_connections.php on line 32
Warning: 1 is not a valid Oracle-Connection resource in
/home/alban/public_htdocs/test/nested_connections.php on line 33
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=11486&edit=1