php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20006 cannot use 2 database connections
Submitted: 2002-10-21 04:08 UTC Modified: 2003-12-12 07:56 UTC
Votes:3
Avg. Score:4.0 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (66.7%)
From: kezal at mail dot ru Assigned:
Status: Closed Package: OCI8 related
PHP Version: 4.3.3RC4-dev OS: Linux (RH)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kezal at mail dot ru
New email:
PHP Version: OS:

 

 [2002-10-21 04:08 UTC] kezal at mail dot ru
If you have created 2nd connection, you cannot use
1st connection. I think 2nd connection doesn't create its own Oracle cursor till first oraparse/exec executed

=== cut ===
	//1. Connect and exec OK.
	$conn_id1 = ociLogon("test","test123");
	$stmt1 = ociparse($conn_id1,"select count(*) from tbl_lang_");
  	ociexecute($stmt1);

	//2. Connect OK.
	$conn_id2 = ociLogon("book1","book123");

	//3. Exec fails!
	$stmt1 = ociparse($conn_id1,"select count(*) from tbl_lang_");
  	ociexecute($stmt1);
=== cut ===

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-21 05:29 UTC] thies@php.net
i could verfy that indeed there is a problem. please add a 
2nd tnsname for the same database and do 
$a = ocilogon(.., .., tns1); 
$b = ocilogon(.., .., tns2); 
to get two independent database connections. 
 
i really hope that i find some time to fix this soon!! 
 
 [2002-10-21 08:48 UTC] maxim@php.net
Also,

once you're there, Thies, what could we about maintaining the connections over the database reloads as reported in several posts earlier.

I am, refering for the cases when, after restarting Oracle you'd need to necessarely restart apache. I tried to research on it and it seems to me that this is doable by controlling the connection via Zend handlers (or something like that) but I am still learning about Zend Engine, so couldn't fix that part yet.

Maxim Maletsky
 [2003-11-12 01:39 UTC] ash at deakin dot edu dot au
Just a question.. are the dates correct for this bug?  The version this bug applies to is 4.3.3RC4 which is reasonably current (well, last few months).

I did come across the problem, and was glad to know the cause of the problem.

Thanks!
 [2003-12-08 04:52 UTC] tony2001 at phpclub dot net
I can't reproduce this bug neither with HEAD, nor with PHP_4_3 branch.
does it still exist?
 [2003-12-12 07:56 UTC] phanto@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

seems to be fixed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 09:01:26 2024 UTC