#11486 [WFx->Bgs]: Oracle connection resource disappears in nested connections
| From: | alban dot hertroys at ddnh dot nl | Date: | Mon, 19 Aug 2002 15:07:40 +0000 |
| Subject: | #11486 [WFx->Bgs]: Oracle connection resource disappears in nested connections | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17202@lists.php.net to get a copy of this message | ||
ID: 11486
User updated by: alban.hertroys@ddnh.nl
Reported By: alban.hertroys@ddnh.nl
-Status: Won't fix
+Status: Bogus
Bug Type: Oracle related
Operating System: Debian Linux i686
PHP Version: 4.0.4pl1
New Comment:
It is really very easy to reproduce with the sample-code below. All you
need to do is change the username/password, and off you go. Every
Oracle database has a dual table.
I'm sure you, or some other PHP-developer knows people who meet the
requirements to verify this. Maybe even one of you guys does.
You can hardly expect me to request my sysadmin to setup a box with
PHP4.2 and Oracle, just because I need to verify a nested
Oracle-connection bug that I reported more than a year ago. After all,
I'm not the person who left this bug-report open that long. Be
reasonable.
But the "won't fix" status is at least clear and I can live with it.
We don't use ora-connections anymore (except for some old projects that
are still running) and oracle-connections are way too expensive to
justify setting up multiple, anyway.
It's still a bug, but I think you're right in thinking that nobody will
bother.
[I hope this reply won't put the status back to 'bogus', but there is
no 'wont fix' status in the dropdown... In that case, sorry.]
Previous Comments:
------------------------------------------------------------------------
[2002-08-19 10:52:06] thies@php.net
i'm almost sure this problem is still in the code.
the workaround would be to have two different TNS names
for the same database and use them in the ora_logon call.
if you use oracle client > 8.0 you should be using the
newer and more powerful oci*() interface to talk to your
database (event < 8.0) and use ocinlogon to force
transaction isolation.
------------------------------------------------------------------------
[2002-08-19 10:30:46] kalowsky@php.net
No, I can't do better than marking it bogus. I don't have a copy of
Oracle, nor is 4.0.5 the latest PHP. There were massive changes to the
code between 4.0 and 4.1, and then from 4.1 to 4.2. There is no more
work being done on the 4.0 branch, thus if you wish to have this bug
fixed you need a newer version.
------------------------------------------------------------------------
[2002-08-19 10:27:39] alban.hertroys@ddnh.nl
That won't be quite possible.
I use the combination of this PHP-version (by now it's
PHP4.05something) and Oracle at work. I am certain that I cannot
persuade my colleagues to use an untested (= recent) version of PHP4.
It is very easy to test if you can reproduce this bug, if you have a
recent version of PHP and Oracle available. But I haven't, so someone
else'll have to try.
It's a bit easy to mark a bug-report as "bogus" just because it was
submitted more than a year ago. You can do better than that, can't you?
------------------------------------------------------------------------
[2002-08-17 01:39:59] kalowsky@php.net
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.
------------------------------------------------------------------------
[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