RE: [PHP-DB] Re: oci8 cannot connect after restarting DB
On Thu, 2004-11-18 at 11:41 -0700, [EMAIL PROTECTED] wrote: > During my presentation at the PHP Conference in Frankfurt I put > out a call for participation in creating a roadmap for Oracle > connectivity in PHP. > > When I get back to work (I'm on a short vacation in Europe with > intermittent email access) I'll be following up on this. While I'm > away, feel free to fill my inbox with suggestions and discussion > of your application architecture requirements. I've been recently looking into the OCI8 extension. Alas, with PHP5 and multithreaded web servers (Apache2 et.al.), the connection handling seems to be completly broken. Using PHP5 and the current oci8 module in an mt environment leads to sessions stacking up on a single server connection without getting closed nor reused. I didn't try the classic multi process environment, but I suspect the same broken behaviour to show up. So what you get right now is a non working session multiplexing (ala Oracle MTS) which surely is not what people want when the need "connection pooling". Another area where PHP Oracle support needs improvement is national charset support. Currently NCLOBs simply don't work. Additionaly, the LOB handling support is more complex (using implicit LOB descriptors) than it need to be, taking into consideration the LOB handling capabilities introduced with OCI 9.2. Using the new thread safe hash lists of PHP5, I've successfully implemented (let's say proof of concept quality ;-)) an extension based on the current OCI8 code that can use native OCI session pooling (instead of implementing own connection pooling code) and is able to handle national character data while mostly retaining backwards compatability - "normal" connects are still possible besides predefinded pools. So what to do? While I see great potential in PDO, having a common API as in JDBC or ODBC would be great, it seems there isn't much development going in that direction. Additionaly, every application would need a major rewrite to switch from the current oci8 extension to something different. So, building on the existing OCI8 extension and improving it in the afore mentioned areas seems to a pragmatic approach while retaining PHP API compatability for people already using Oracle with PHP. This would mean dropping support for client libraries before Oracle 9.2, making it possible to throw away much of the convoluted legacy stuff in the connection / LOB handling code. Remember, with OCI client 9.2, you can still connect to 8.1 databases. If there is still demand for connecting to pre 8.1 databases, people would have to stick with PHP4, which seems to me reasonable. Any comments are welcome to better support the greatest RDBMS with PHP ;-) -Andreas -- Andreas Karajannis mediaworx berlin AG Fon (030) 2 75 80 - 266 Fax (030) 2 75 80 - 200 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: RE: [PHP-DB] Re: oci8 cannot connect after restarting DB
During my presentation at the PHP Conference in Frankfurt I put out a call for participation in creating a roadmap for Oracle connectivity in PHP. When I get back to work (I'm on a short vacation in Europe with intermittent email access) I'll be following up on this. While I'm away, feel free to fill my inbox with suggestions and discussion of your application architecture requirements. Chris PS The Zend guys have kindly offered to look at the commonly reported Windows/PHP5.0.2/OCI8 crash. Or if anyone is compiling this combo maybe they can contribute???--- Begin Message --- Hi John, Just saw your blog today on Andi's PHP5 / Oracle article. One of the two bugs you sited in your previous email was one that I opened (http://bugs.php.net/bug.php?id=30808) I'm not sure what the case is with the 4.3.x line, but my hunch this issue is 'bigger' than PHP5. More troubling is tony2001 response to my bug report (we don't want to turn on the noted fix, but will implement something workable with PDO). I'm anxious to hear his reply to my follow-up: it makes no sense to me that oracle users will have to settle for broken logon functions (with the fix sitting commented in the current code) or abandond the oci8 library all together for PDO when it hits the streets (which will be some time). Best, Michael -Original Message- From: John Lim [mailto:[EMAIL PROTECTED] Sent: Thursday, November 18, 2004 3:42 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: oci8 cannot connect after restarting DB Michael, After rereading your post again, i realise you mentioned it's happening with non-persistent connections also. That puzzles me. Perhaps we are talking about multiple bugs here. In general, I have not found PHP5 and oci8 to be very stable, and would not recommend moving anything production to use PHP5 just yet. Regardsd, John "John Lim" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > > This is because you are using persistent connections, which are left > dangling and do not restart after the database restarts. Apparently > you can hack your tnsnames.ora or oci8 extension. > > See http://bugs.php.net/bug.php?id=15390 > > and http://bugs.php.net/bug.php?id=30808 > > Regards, John > > "Michael Caplan" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Every evening, for whatever reason, our Oracle db (9.2.0) is >> restated. After it is restarted, I am unable to build a connection >> with Oracle from PHP untill Apache is restarted. >> >> Whenever I do an ociplogon() or ocilogon() following an Oracle DB >> restart, >> it fails but I am unable to get a description of the error. Restarting >> Apache "fixes" the problem. >> >> Has anyone else experianced the same issue? It appears to me that >> this >> is a >> php oci8 bug. (shouldn't a new connection be built if a persistant >> connection fails, and if not using persistant connections, shouldn't this >> be >> a non issue?) >> >> Thanks, >> >> Michael >> >> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- End Message --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: oci8 cannot connect after restarting DB
Hi John, Just saw your blog today on Andi's PHP5 / Oracle article. One of the two bugs you sited in your previous email was one that I opened (http://bugs.php.net/bug.php?id=30808) I'm not sure what the case is with the 4.3.x line, but my hunch this issue is 'bigger' than PHP5. More troubling is tony2001 response to my bug report (we don't want to turn on the noted fix, but will implement something workable with PDO). I'm anxious to hear his reply to my follow-up: it makes no sense to me that oracle users will have to settle for broken logon functions (with the fix sitting commented in the current code) or abandond the oci8 library all together for PDO when it hits the streets (which will be some time). Best, Michael -Original Message- From: John Lim [mailto:[EMAIL PROTECTED] Sent: Thursday, November 18, 2004 3:42 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: oci8 cannot connect after restarting DB Michael, After rereading your post again, i realise you mentioned it's happening with non-persistent connections also. That puzzles me. Perhaps we are talking about multiple bugs here. In general, I have not found PHP5 and oci8 to be very stable, and would not recommend moving anything production to use PHP5 just yet. Regardsd, John "John Lim" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > > This is because you are using persistent connections, which are left > dangling and do not restart after the database restarts. Apparently > you can hack your tnsnames.ora or oci8 extension. > > See http://bugs.php.net/bug.php?id=15390 > > and http://bugs.php.net/bug.php?id=30808 > > Regards, John > > "Michael Caplan" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Every evening, for whatever reason, our Oracle db (9.2.0) is >> restated. After it is restarted, I am unable to build a connection >> with Oracle from PHP untill Apache is restarted. >> >> Whenever I do an ociplogon() or ocilogon() following an Oracle DB >> restart, >> it fails but I am unable to get a description of the error. Restarting >> Apache "fixes" the problem. >> >> Has anyone else experianced the same issue? It appears to me that >> this >> is a >> php oci8 bug. (shouldn't a new connection be built if a persistant >> connection fails, and if not using persistant connections, shouldn't this >> be >> a non issue?) >> >> Thanks, >> >> Michael >> >> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php