Skip to content
PHP PDO_OCI functions via OCI8 extension
PHP Shell
Branch: master
Clone or download

Oracle PDO Userspace Driver for OCI8

PDO via Oci8

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

The yajra/pdo-via-oci8 package is a simple userspace driver for PDO that uses the tried and tested OCI8 functions instead of using the still experimental and not all that functionnal PDO_OCI library.

Please report any bugs you may find.


Add yajra/laravel-pdo-via-oci8 as a requirement to composer.json:

    "require": {
        "yajra/laravel-pdo-via-oci8": "2.*"

And then run composer update


There is a test suite (using PHPUnit with a version bigger than 6.x) on the test directory. If you want to test (you must test your code!), create a table called people with two columns:

  1. name as varchar2(50)
  2. email as varchar2(30)

And some environment variables:

  1. OCI_USER with the database user name
  2. OCI_PWD with the database password
  3. OCI_STR with the database connection string

And then go to the test dir and run PHPUnit like:

phpunit --colors .

Examle to get it up and running on docker DB

create pluggable database testpdb admin user oracle identified by system file_name_convert = ('/pdbseed/', '/testpdb01/');
alter pluggable database testpdb open;


CREATE TABLE person (name NVARCHAR2(50), email NVARCHAR2(30));

Buy me a coffee

paypal Become a Patron


The MIT License (MIT). Please see License File for more information.


You can’t perform that action at this time.