Most PHP OCI8 users link PHP with the Oracle Instant Client (IC) libraries that handle the underlying "client" (i.e PHP OCI8 extension) communication with the database. IC is relatively small for the features it gives, and is very easy to install. A ZIP or RPM download unpacks a few libraries.
Despite hearing the "disk is cheap" mantra most of my professional life, sometimes less is more, such as when it comes to reducing deployment and backup costs. Although IC isn't particularly big - and it's getting relatively smaller all the time - there are two ways to reduce its size:
1. Use the Basic Lite instead of Basic package. This is much smaller because it only supports common character sets and only has English error messages.
2. Remove the JDBC, ODBC and OCCI libraries. These libraries are not needed by PHP OCI8.
The IC Basic package libraries needed for PHP OCI8 are given in table 1-3 of the OCI Manual:
On Linux:
libclntsh.so.11.1
libnnz11.so
libociei.so
Or on Windows:
oci.dll
oraociei11.dll
orannzsbb11.dll
The IC Basic Lite package libraries needed for PHP OCI8 are given in table 1-5 of the OCI manual:
On Linux:
libclntsh.so.11.1
libnnz11.so
libociicus.so
Or on Windows:
oci.dll
oraociicusll.dll
orannzsbb11.dll
If using the ZIP files on Linux, don't forget to create the symbolic link:
ln -s libclntsh.so.11.1 libclntsh.so
before building PHP OCI8.
Comments (1)
Excellent write up, thanks for helping with the basic installation.
Posted by Brian | May 26, 2009 5:40 AM
Posted on May 26, 2009 05:40