0
votes

I am trying to install the php (5.5) extension OCI8 for my Oracle 11g database. However upon doing sudo pecl install oci8-2.0.8 I get the following error:

[...] Build process completed successfully

Installing '/usr/lib/php/extensions/no-debug-non-zts-20121212/oci8.so'

ERROR: failed to write /usr/lib/php/extensions/no-debug-non-zts-20121212/oci8.so (copy(/usr/lib/php/extensions/no-debug-non-zts-20121212/oci8.so): failed to open stream: Operation not permitted)

Changing directories to the build path (tmp/pear/install/...) returns directory non-existent.

I am on Mac OSX El Capitan, I have followed these instructions, which noted PHP 5.4 not 5.5.

Not sure what to do anymore - it's one problem after another.

2

2 Answers

0
votes

Solved by disabling System Integrity Protection, running the pecl install, and re-enabling System Integrity Protection.

0
votes

XAMP 5.5.30-6-VC11 and oracle config

  1. Download instantclient_11_2 and uzip to c:\instantclient_11_2 (make sure your xamp and instantclient both are same architechture x86 or 64-bit)
  2. setup ENVIRONMENT PATH for c:\instantclient_11_2 before any oracle directory. Restart PC
  3. download oci8 dll from http://pecl.php.net/package/oci8/2.0.6/windows
  4. select 5.5 Thread Safe (TS) x64 from above link
  5. unzip and copy all files to c:/xampp/php/ext directory
  6. open php.ini remove (;) for extension=php_oci8.dll and save it
  7. restart apache
  8. look phpinfo and search for oci8 module if found and enabled then ok.
  9. test with php oracle connection script .