php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11234 OCILogoff() doesn't disconnect from server
Submitted: 2001-06-01 06:43 UTC Modified: 2004-07-21 10:12 UTC
From: worawisu at loxinfo dot co dot th Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 4.0.5 OS: Linux Redhat 6.2 (kernel 2.2.14)
Private report: No CVE-ID: None
 [2001-06-01 06:43 UTC] worawisu at loxinfo dot co dot th
I use OCIPLogon() function to log on to oracle dbms. And when i 'd like to quit i use OCILogoff(). But the db session also still (don't log off) .
this is my script:

<?php

$conn=OCIPLogon($usr,$passwd,$host) or die("Cannot Logon to Database Server");
$sql="select * from my_table ";
$stmt=OCIParse($conn,$sql);

echo "Connection ID 1 = $conn <br>\n";
OCIFreeStatement($stmt);

OCILogoff($conn);

echo "Connection ID 2 = $conn <br>\n";

?>

The result of "Connection ID 1 and 2" is "Resource id #1 ";
(If Session in oracle was ended i think Connection ID 2 must be null value not "Resource id #1" )


This problem still in PHP 4.0.5 (with apache 1.3.20)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-01 11:05 UTC] sniper@php.net
Well, OCIplogon() opens a PERSISTANT connection.
Use ocilogon() instead.


 [2001-06-03 22:02 UTC] worawisu at loxinfo dot co dot th
But the problem still when using OCILogon() too with the very simple code.(I just try every Logon function of OCI. When try each one and Monitor the session status (from v$session view using Oracle Sql+).

<?php

include("db_config.php");
$conn=OCILogon($User,$Password,$Database);
print "Connection1 = $conn <br>\n";


OCILogoff($conn);
print "Connection2= $conn <br>\n";
?>

Reqard.

 [2004-07-21 10:04 UTC] katiakreol at yahoo dot fr
Hi
I have got the same problem!! Ocilogoff does not disconnect!
I absolutely have to use ociplogon and it is very annoying to be unable to disconnect! There has to be a solution please help!!
 [2004-07-21 10:12 UTC] tony2001@php.net
OCILogoff() does nothing at the moment, leaving this responsibility to the Oracle server, which should close connections automagically after the expiration of a timeout.
So you just need to set an appropriate settings and Oracle will do it for you.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jan 20 06:01:23 2020 UTC