|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-08-17 01:39 UTC] kalowsky@php.net
[2002-08-19 10:27 UTC] alban dot hertroys at ddnh dot nl
[2002-08-19 10:30 UTC] kalowsky@php.net
[2002-08-19 10:52 UTC] thies@php.net
[2002-08-19 11:07 UTC] alban dot hertroys at ddnh dot nl
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 11:00:01 2025 UTC |
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