#20006 [Ana->Ver]: cannot use 2 database connections
| From: | sniper@php.net | Date: | Wed, 15 Oct 2003 01:03:36 +0000 |
| Subject: | #20006 [Ana->Ver]: cannot use 2 database connections | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-49035@lists.php.net to get a copy of this message | ||
ID: 20006
Updated by: sniper@php.net
Reported By: kezal at mail dot ru
-Status: Analyzed
+Status: Verified
Bug Type: OCI8 related
Operating System: Linux (RH)
PHP Version: 4.3.3RC4-dev
Previous Comments:
------------------------------------------------------------------------
[2002-10-21 08:48:34] 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
------------------------------------------------------------------------
[2002-10-21 05:29:05] 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 04:08:02] 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 ===
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20006&edit=1