ID:               16181
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         OCI8 related
 Operating System: RedHat 7.2
 PHP Version:      4.1.2
 New Comment:

This bug has been fixed in CVS.




Previous Comments:
------------------------------------------------------------------------

[2002-03-20 06:22:44] [EMAIL PROTECTED]

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.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16181&edit=1

Reply via email to