2

I am trying to install OCI8 on default PHP that came with OS X Mavericks (PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38)).

I have installed Oracle Instant Client (Version 11.2.0.3.0 (64-bit)) and I am able to run sqlplus and connect to oracle server.

I have installed oci8 using pecl: pecl install oci8 and I got:

...
Build process completed successfully
Installing '/usr/lib/php/extensions/no-debug-non-zts-20100525/oci8.so'
install ok: channel://pecl.php.net/oci8-2.0.6
Extension oci8 enabled in php.ini

however when I do php -v I get:

~ $ php -v
PHP Warning:  PHP Startup: oci8: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
in Unknown on line 0
PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38)
...

I understand that PHP and OCI version mismatch but I don't know how to remedy this. Any suggestions please.

Gurpreet
  • 81
  • 1
  • 7
  • I don't really know why you can find OCI8 at PECL given that it's a [native extension](http://us2.php.net/manual/en/oci8.requirements.php) but I suspect you should be able to find a pre-compiled binary for your system in the same place you got PHP. Perhaps that's an option. – Álvaro González Nov 05 '13 at 10:50
  • The precompiled version of PHP that comes with Mavericks doesn't contain OCI8 by default. Also [this](http://us2.php.net/manual/en/oci8.installation.php) page tells to reconfigure php with the option `--with-oci8` to enable OCI8 extension. – Gurpreet Nov 05 '13 at 11:17

0 Answers0