Page 1 of 1

Oracle Cursor Problem

Posted: Tue Nov 05, 2002 11:36 pm
by giridhars
Hello,

I am facing a strange problem when using PHP with Oracle. We have used PHP to web-enable one of our existing application that uses Oracle. The application (which is a product) has been running on Oracle without any issues and is deployed at various production site for various customers.

We developed a PHP layer on this product to web-enable this product. Our PHP layer talks to Oracle directly. We are facing problem with Oracle cursor problem ever since we have started testing this PHP. We have made sure that we call the following functions in sequence for ALL the database operations we do in PHP:

ora_logon() - gets a connection handle
ora_open() - gets a cursor
ora_parse() - to parse the query before execution
ora_exec() - to run the query and return the cursor
ora_fetch() - fetch records read
ora_close() - close the cursor
ora_logoff() - close the db connection

Once Oracle is restarted, we don't get any problem for some time and suddenly oracle fails to create more cursors. This indicates that cursors are not being released properly. I have open_cursors to 255 in my SID initialization file. There are no other applications accessing this db to cause this error.

Has anybody faced this problem using Oracle ? Any idea on trapping this problem and identifying what the problem is ?