php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16181 Persistent OCINLogon session-handles
Submitted: 2002-03-20 06:22 UTC Modified: 2002-04-13 09:17 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: msquillace at sogei dot it Assigned:
Status: Closed Package: OCI8 related
PHP Version: 4.1.2 OS: RedHat 7.2
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:
MUST BE VALID
Solve the problem:
11 + 24 = ?
Subscribe to this entry?

 
 [2002-03-20 06:22 UTC] msquillace at sogei dot it
Environment is Linux RedHat 7.2, Apache 1.3.23, PHP 4.1.2 DSO with OCI8 (8.1.7.0) and several other extensions; the Oracle database (8.1.7.3) is on a Win2k server. 

I have a script implementing session handling against Oracle that's included at the top of each and every page of an application.

I cannot share the transaction context with the application but want to create a single, persistent connection to the DB, so I use OCIPlogon('user1', 'pwd1', 'alias') in the included file, while the application connects with OCINlogon('user2', 'pwd2', 'alias').

If I query the v$session table for username,process,status I observe an ever growing number of INACTIVE 'user2' sessions for each process, and eventually Oracle complains for too many sessions.

I read "Making efficient use of Oracle8i thru Apache and PHP 4" thoroughly and believed I was following its advice:

"...so if you need to isolate transactions on one page you would use OCILogon() or OCIPLogon() for the "main" connection and create an additional connection using OCINLogon(). the OCINLogon() connection would be handled thru the same server-handle as the other connection but would have it's own session-handle. side-note: the session-handle created by OCINLogon() will always be freed at the end of the script..."

Looks like the above is not true when using OCIPLogon, but I think it should be.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-13 09:17 UTC] thies@php.net
This bug has been fixed in CVS.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 14:01:32 2024 UTC