Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle, PDO_OCI vs OCI8

The company I work for currently uses some basic functions to abstract the OCI libraries as a means for DB connectivity. We're considering switching to PHP's PDO object, but from some quick searches, it looks like the Oracle driver is a bit less mature than the other PDO drivers. I would appreciate some pro/cons for PDO/oci8 from anyone who has used it in a production environment.

Thanks!

like image 360
jarcoal Avatar asked Apr 01 '10 21:04

jarcoal


People also ask

What is Oracle OCI8?

Oracle PHP Developer Center PHP OCI8 and PDO_OCI are part of the PHP open source project. They are maintained by Oracle. The PHP OCI8 extension is the premier interface for working with Oracle Database, bringing high performance and availability features to PHP.

How can I check my OCI8 status?

2) Run the command "php -m" (without the quotes). If this list doesn't include the OCI8 extension, and all of the previous steps have been carried out correctly, this means that there is a problem running the OCI8 extension. To check this, run the "php -i" command.


1 Answers

I don't have personal experience with the PDO driver (being tagged as experimental was enough for not even considering it). But in The Underground PHP and Oracle Manual we can read the following, as preface to the PHP PDO Extension chapter:

The PDO extension and PDO_OCI driver are open source and included in PHP 5.1 onwards. Oracle does not contribute to PDO_OCI.

The PHP community has let the PDO project languish and Oracle recommends using OCI8 instead whenever possible because of its better feature set, performance, reliability and stability. Use of PDO_OCI for general purpose applications is not recommended.

The extension is not finished, it's probably poorly maintained (although some bug fixes get through now and then) and it's been that way for years. I would not put my eggs in that basket.

like image 170
Álvaro González Avatar answered Oct 09 '22 04:10

Álvaro González