From:             [EMAIL PROTECTED]
Operating system: RedHat 7.2
PHP version:      4.1.2
PHP Bug Type:     OCI8 related
Bug description:  Persistent OCINLogon session-handles

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 bug report at http://bugs.php.net/?id=16181&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16181&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16181&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16181&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16181&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16181&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16181&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16181&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16181&r=submittedtwice

Reply via email to