« Performing Transactions with Oracle and PHP | Main | Oracle Database 10g Express Edition »

Problem with PHP OCI extension and Oracle connection

Recently I had a serious problem with PHP OCI extension and Oracle. I have written many applications running from the same box and connection to the same Oracle database and all of them was working fine excepting this one.

The connection work successfully, but when the scripts execture the query it fails and return this warning :

Warning: ociexecute(): OCIStmtExecute: ORA-03114: not connected to ORACLE in /usr/local/apache/htdocs/script.php on line 152

There was no high load on the Oracle server, and the problem is that the same code sometimes work and sometimes not. In the Oracle manual I found that the error ORA-03114 mean that there was problem in connection between the two servers. The network have been tested, everything was perfect.

In the mean time I solved the problem by saving the failed queries in a mysql database, and with a cron check every 5 minutes to run again these queries. But I don't think it could solve the problem in the long time.

Bookmark this article at these sites
Comments
1

Get the refactored OCI8 driver, which was rearchitected for stability and had many bug fixes. You can get it from http://pecl.php.net/package/oci8 or http://pecl4win.php.net/ext.php/php_oci8.dll

If you still have problems, post to Oracle's OTN forum.

-- cj

2

I had always to compile if I have to change the OCI extension. I've PHP running on a sun solaris OS. changing the extension would be my last choice because it was working fine before. thx anyway

Post a comment





(Email will remain hidden)





Please enter the security code you see here




Related entries
Email to a friend
Email this article to:


Your email address:


Message (optional):