- Installed or Verified that Homebrew is installed on your Mac. If hasn’t installed yet, open terminal and paste command which is written on the actual Homebrew website
- Install the PEAR package manager to run PECL.
- Download these files from Oracle website
- Create and unzip all theses files into a the directory `/usr/local/instantclient/12_1/`.
This directory will looks like:
- Create Symbolic link
ln -s /usr/local/instantclient/12_1/sdk/include/*.h /usr/local/include/
ln -s /usr/local/instantclient/12_1/sqlplus /usr/local/bin/
ln -s /usr/local/instantclient/12_1/*.dylib /usr/local/lib/
ln -s /usr/local/instantclient/12_1/*.dylib.11.1 /usr/local/lib/
ln -s /usr/local/lib/libclntsh.dylib.11.1 /usr/local/lib/libclntsh.dylib
- Test with sqlplus instantclientsqlplus firstname.lastname@example.org:1521/test
- Install extension with pecl
- If the script prompt you to provide the path to ORACLE_HOME directory, respond with:/usr/local/instantclient/12_1
And your are done, normally pecl will automatically load the extension in your `php.ini`. If not, add the following line to your `php.ini`:
- Restart your HTTP Server and test.
Below links for more reference: