|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-03-23 13:59 UTC] guage at usa dot net
In reading the source code in Beta 4.0 it states that OCILogoff doesn't do anything anymore. This is a problem because when a session is killed on the database side the connection remains for ever on the server and you receive ORA-0028 errors when ever you hit an httpd server which has that particular session. The only solution is to restart the httpd server.
To reproduce:
1. create a script which does an ociplogon and then executes a statement.
2. hit reload several times to increase the chance you will hit an httpd after you kill a session which has already established a connection to the database.
3. on the server type:
select username,sid,serial# from v$session where username = '<username you connected with in ociplogon>';
4. do a:
alter system kill session '<sid>,<serial#>';
for each of the sessions.
5. hit reload on your browser.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 09:00:01 2025 UTC |
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.