Skip to content

Instantly share code, notes, and snippets.

@kopiro
Last active August 28, 2017 08:08
Show Gist options
  • Save kopiro/bcd23192a5ced778ecee3a6ae98062f2 to your computer and use it in GitHub Desktop.
Save kopiro/bcd23192a5ced778ecee3a6ae98062f2 to your computer and use it in GitHub Desktop.
PHP 5.6 OCI8 installation

PHP OCI8 installation

Download the InstantClient from the Oracle website

  • instantclient-basic-macos.x64-VERSION.zip
  • instantclient-sqlplus-macos.x64-VERSION.zip
  • instantclient-sdk-macos.x64-VERSION.zip

Create and unzip all theses files into a the directory /opt/instantclient/VERSION

Use this script to install:

#!/bin/bash

ver="11.2.0.4"
v="11"
ln -svf "/opt/instantclient/$ver" /opt/instantclient/latest

ln -sfv /opt/instantclient/latest/sdk/include/*.h /usr/local/include
ln -sfv /opt/instantclient/latest/sqlplus /usr/local/bin
ln -sfv /opt/instantclient/latest/*.dylib /usr/local/lib
ln -sfv /opt/instantclient/latest/*.dylib.* /usr/local/lib
ln -sfv /usr/local/lib/libclntsh.dylib.* /usr/local/lib/libclntsh.dylib

sudo mkdir -p /ade/dosulliv_ldapmac/oracle/ldap/lib
sudo chmod -R 777 /ade/dosulliv_ldapmac/oracle/ldap/lib
ln -svf /usr/local/lib/libnnz11.dylib /ade/dosulliv_ldapmac/oracle/ldap/lib/libnnz11.dylib

echo 'instantclient,/usr/local/lib' | pecl install oci8-2.0.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment