|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11614 ociplogon always reopens a new connection
Submitted: 2001-06-22 05:50 UTC Modified: 2001-06-22 06:38 UTC
From: boltthrower at libero dot it Assigned:
Status: Closed Package: OCI8 related
PHP Version: 4.0.5 OS: windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
43 + 1 = ?
Subscribe to this entry?

 [2001-06-22 05:50 UTC] boltthrower at libero dot it
$conn = ociplogon('user','pass','testdb');
echo "Server Version: " . OCIServerVersion($conn);

reloading the same page I get ever more connections;

you can check it with:
select * from v$session where status ='ACTIVE'  


oracle version is:
Oracle8i Enterprise Edition Release - Production
With the Partitioning option
JServer Release - Production

web server:
Apache 1.3.12, with php running as a module

the only active module in php.ini is oci8.dll;


the php manual, chapt.22 says :
When a persistent connection is requested, PHP checks if there's already an identical persistent connection (that remained open from earlier) - and if it exists, it uses it. If it does not exist, it creates the link.

is this related to apache's multithreaded behaviour on windows?



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-22 06:38 UTC] boltthrower at libero dot it
I think I've found a really valid explanation:

Christopher Ostmo <> told me

"the connections are actually persistent, which 
means that you will in fact benefit.  The down side is that you are not 
going to always get the same persistent connection for each request"

and finally I understood:

to be sure, I've set 
ThreadsPerChild 3
in my httpd.conf and now get a maximum of 3 persistent connections to oracle; (this is just an explanation for someone who thinks to have the same problem...)

this simply means you have to estimate and configure web&oracle server for the worst case (maximum number of conn.)


(I think this can be quickly closed)

 [2002-05-06 09:32 UTC] cunha at gabcmt dot eb dot mil dot br
Sorry, but the idea of persistent connection is to keep only "one" and the "same" connection to the database as long as the parameters are the same, isn't it ?

>>ThreadsPerChild 3
What does it mean? Does PHP open a persistent connection for each Thread? Why can't be only one connection for all threads? Inter-process serialization problems ?

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Apr 02 12:03:38 2023 UTC