ID: 3910 Comment by: michael dot virnstein at brodos dot de Reported By: guage at usa dot net Status: Closed Bug Type: Oracle related Operating System: Linux - Redhat 6.1 PHP Version: 4.0.01pl2 New Comment:
bug still exists when using php as apache module If you use OCIPLogon, the function doesn't recognize if the connection is still valid from the oracle side. It seems to still think there is a valid connection and returns the handle. PHP recognize it, when you try to use any other OCI-Function on the connection. I've observed, that after that, the connection gets reastablished if possible. If the DB went down and got up again, you can observe it quite nicely by hitting REFRESH a few times. try to use this code: <?php $conn = ociPLogin("username", "password", "db"); $stmt = ociParse("Select sysdate time from dual"); ociDefinceByName($stmt, "time", $var); ociExecute($stmt); ociFetch($stmt); echo $var; ?> Steps to reproduce: 1. Be sure the DB is up. 2. Load page a few times -> time will get displayed 3. Restart DB and wait for it to finish 4. Open Page again -> you'll get an error on ociParse 5. Now hit refresh a few times. First you'll probably get the error on the ociParse again, but after a few times,it'll start working again, but it'll switch between working and non-working. It seem, that every apache process that is running with a corrupted php-db-connection, reastablishes the connection after the error. If you have luck with the REFRESH, your request will be handled by a process with an already reastablished connection, if not you get the error. Previous Comments: ------------------------------------------------------------------------ [2004-01-06 15:13:29] david dot gaia dot kano at dartmouth dot edu This is happening on our server using PHP 4.3.4 Should this be reopened? ------------------------------------------------------------------------ [2003-08-08 04:46:26] [EMAIL PROTECTED] wrong version -> bug got lost, but is propably fixed in later versions of PHP anyway. ------------------------------------------------------------------------ [2000-08-21 12:26:06] guage at usa dot net OciLogoff seems to do something now but does not clear a connection that has been killed on the oracle server (at least when ociplogon is used). The only way to recover from this situation is to restart the httpd server. I have tried to create a new connection via ociplogon but it continues to try to use the old connection which was killed. OCIPlogon returns a success but ociexecute returns an error. connecting to oracle Connected successfully ^- does a ociplogon Warning: OCIStmtExecute: ORA-00028: your session has been killed in orabugtest.php on line 12 ^--- this is from a ociexecute killing session !!!!! <--- this does a ocilogoff Warning: failed to rollback outstanding transactions!: ORA-01012: not logged on in orabugtest.php on line 16 Warning: OCIFetchStatement: OCI_INVALID_HANDLE in orabugtest.php on line 18 ------------------------------------------------------------------------ [2000-08-21 12:19:48] guage at usa dot net Bug still exists. I have verified for php 4.0.1pl2 Thanks... ------------------------------------------------------------------------ [2000-08-20 01:54:04] [EMAIL PROTECTED] No feedback from user. --Jani ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/3910 -- Edit this bug report at http://bugs.php.net/?id=3910&edit=1