note 32215 added to function.ocinlogon

From: Date: Tue, 20 May 2003 18:45:48 +0000
Subject: note 32215 added to function.ocinlogon
Groups: php.notes 
Request: Send a blank email to php-notes+get-48676@lists.php.net to get a copy of this message
This describes a problem we were having using PHP and Oracle8i on Unix, with OCILogon/OCILogoff and our workaround, which uses OCINLogon We were using PEAR::DB to abstract all of our database calls w/o a problem until a lot of users started using the web page. Then the following error started popping up intermittently: OCIStmtExecute: ORA-00021: session attached to some other process; cannot switch session This error was appearing on the very first database call of every web page. After going through every file and double checking that all connections are handled properly in php, i turned on ociinternaldebug(). when the above error occurred, the first line of html was: OCIDebug: oci_do_connect: id=1 And not: OCIDebug: _oci_open_server new conn=0 .. And the last several lines: OCIDebug: START php_rshutdown_oci OCIDebug: END php_rshutdown_oci OCIDebug: START _oci_close_session: logging-off sess=2 OCIDebug: START _oci_close_server: detaching conn=1 ... This led me to believe that the oracle client driver (Revision: 1.169.2.3) running on unix wasn’t closing the connection properly and the next time a web page loaded, PHP was attempting (unsuccessfully) to reuse the connection. Our temporary workaround was to change the PEAR::DB connection call from OCILogon to OCINLogon. Using this method we haven't had any problems so far, but we're still exploring other more permenant solutions. It took me a long time to figure this out, while the people who needed to use this software were given a temporary and annoying solution to refresh the page. If anyone else runs into a similar situation, hopefully the above will help. ---- Manual Page -- http://www.php.net/manual/en/function.ocinlogon.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32215 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32215&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32215&report=yes

« previous php.notes (#48676) next »