#43336 [Asn->Fbk]: pdo_oracle: $db = null does not trigger logoff

From: Date: Sat, 25 Apr 2009 14:51:45 +0000
Subject: #43336 [Asn->Fbk]: pdo_oracle: $db = null does not trigger logoff
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-136264@lists.php.net to get a copy of this message
 ID:               43336
 Updated by:       jani@php.net
 Reported By:      michas61 at wp dot pl
-Status:           Assigned
+Status:           Feedback
 Bug Type:         PDO related
 Operating System: Linux
 PHP Version:      5.2CVS-2007-11-19 (CVS)
 Assigned To:      sixd
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




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

[2007-11-19 15:46:09] johannes@php.net

Christopher, please take a look.

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

[2007-11-19 14:50:58] michas61 at wp dot pl

Description:
------------
I'm using PDO to connect to Oracle Database. Function "$conn = new
PDO(...)" connect to database and this is ok. When I use "$conn = null"
connection is close, but this variable doesn`t logoff user from
database. It looks like PDO is killing connection and at this moment
doesn`t trigger logoff in database. 


Reproduce code:
---------------
try {
        $db = new
PDO('oci:dbname='.base,login_to_database,pass_to_database);
    	$db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
    	$db->setAttribute(PDO::ATTR_CASE,PDO::CASE_LOWER);
    	$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
    } 
    catch (PDOException $e) {
   	echo "Not connected: " . $e->getMessage();
   	exit;
    }

... ....

$db = null;



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


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



Thread (3 messages)

« previous php.bugs (#136264) next »