ID:               47867
 Updated by:       s...@php.net
 Reported By:      jvillarroel at dazasoftware dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         OCI8 related
 Operating System: Windows 2003
 PHP Version:      5.2.9
-Assigned To:      
+Assigned To:      sixd
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

------------------------

This is expected due to the reference counting behavior of PHP
resources. The underlying connection isn't closed until all references
are freed.

There's a related discussion in the section "Close Statement Resources
Before Closing Connections" in
http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf



Previous Comments:
------------------------------------------------------------------------

[2009-04-01 20:26:40] jvillarroel at dazasoftware dot com

Description:
------------
Oracle connection handler passing by reference to a function does not
close.
Php.ini include these extensions:
extension=php_mbstring.dll
extension=php_oci8.dll
Web server is:Apache 2.2.10

Reproduce code:
---------------
function CloseConnection(&$strConnection1)
  {    
    OCILogOff ($strConnection1);
  };

$strConnection = OCILogon("SCOTT", 'TIGER', "SERVICE_NAME");  
  
echo "Before CloseConnection strConexion=".$strConnection."-<br>";
CloseConnection($strConnection);
echo "After CloseConnection strConexion=".$strConnection."-<br>";
die();

Expected result:
----------------
Before CloseConnection strConnection=Resource id #2-
After CloseConnection strConnection=-

Actual result:
--------------
Before CloseConnection strConnection=Resource id #2-
After CloseConnection strConnection=Resource id #2-


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47867&edit=1

Reply via email to