This article describes how to upgrade the Oracle Instant Client version (e.g. from 10.2 to 11.2) for Linux, PHP OCI8 Extension. The bit and version numbers have been omitted here. Replace ‘NN’ with the specific Linux x86 (32/64)-bit and Instant Client version.
Download the Basic and the SDK Instant Client (.ZIP) packages from the OTN Instant Client page (http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html) for your system.
Obtain the Basic and SDK Instant Client packages from the location above, and unzip them:
unzip -d /usr/local/ instantclient-basic-linuxNN.zip
unzip –d /usr/local/ instantclient-sdk-linuxNN.zip
This will unzip the files into /usr/local/instantclient_NN (e.g. /usr/local/instantclient_11_2)
Go to Instant Client directory:
Ensure there is a symbolic link for libclntsh.so:
ln -s libclntsh.so.NN libclntsh.so
Go to PHP source directory:
If you have built PHP before, we need to delete all the object files and executables.
Now, configure and build PHP. Adjust the path to Instant Client directory accordingly:
./configure … --with-oci8=instantclient,/usr/local/instantclient_NN …
Use your usual procedure for re-starting Apache Web server, e.g.:
To verify the PHP OCI8 Extension is installed correctly, create a PHP script; phpinfo.php in the Apache document root:
Access the phpinfo.php URL, browse to the “oci8” section, ensure the “Oracle Instant Client Version” is the version you want.