php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42781 oci_new_connect don't make new connection
Submitted: 2007-09-27 17:30 UTC Modified: 2007-09-27 20:33 UTC
From: zbodirog at socgen dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 5.2.4 OS: Windows 2000 server
Private report: No CVE-ID: None
 [2007-09-27 17:30 UTC] zbodirog at socgen dot com
Description:
------------
Sorry for selecting PHP version that we don't have but only on that way I could send you this bug. Reason for that is that it is very difficultu at this point to change version but if you confirm me that that is the only way to solve this problem than we will do it.

We use Oracle 9.2.1.6, PHP 5.0.4. In query we call stored procedure that returns xml.

Problem is that when I call some query that take some time to execute (for example 2 minutes) php create one connection to oracle that is active. When other users try to call some other query php don't create new connection and wait until first procedure (or query) is done. I try to make several connections with oci_new_connect and it only work when connections are inactive, when I have some connection that is active it wait's until that connection is released.

Thanks!

Reproduce code:
---------------
function get_xml() {
$obj_dbms = new dbms_oracle();
$cnnID = $obj_dbms->database_connect();

$out_xml = OCINewDescriptor($cnnID, OCI_D_LOB);
$stored_proc = OCIParse($cnnID,$query);		
oci_bind_by_name($stored_proc, ":out_xml", $out_xml, -1, OCI_B_CLOB);
OCIExecute($stored_proc);
$obj_dbms->database_disconnect($cnnID);
	
}


class dbms_oracle
	{
	
  function database_connect() 
  {
    $cnnID = oci_new_connect($username,$password,$database);
    return $cnnID;
  }
 		
	

Expected result:
----------------
I expect that many users can execute function get_xml() regardless if some of them call procedure that take some time or not. Now if some call procedure of that type others can't work.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-27 20:33 UTC] sixd@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.


-------------------
The oci8 extension was refactored in PHP 5.1.2 to overcome a number of problems including various connection issues.  You need to upgrade.
If you can't upgrade PHP, try upgrading just the OCI8 extension using the code at http://pecl.php.net/package/oci8
-------------------
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 11 12:01:33 2024 UTC