The basic steps are, download and extract basic instant client and SDK instant client. Then do a pecl install oci8 to download and compile oci8 extension. There are few issues I encountered when installing php oci8 extension.
- pear tried to connect directly to pear server. Must set http_proxy using pear config-set command.
- missing links. Because I downloaded zip files, and not rpms, there are few missing links when trying to link oci8 with instant client. The solution is to create them manually
- intermittent compilation problem. One of two compile result in an error, even with exactly the same arguments and environment condition. This means, if it fails, retry at least once, there is a chance that the second compile will work smoothly.
- SElinux issues. Must do some chcon to allow the execution of instant client libraries. See reference #3.
pear config-set http_proxy http://10.x.x.x:8080
Missing link solution
Do these commands when current working directory is where the oracle instant client library were extracted.
ln -s libclntsh.so.10.1 libclntsh.so
ln -s libocci.so.10.1 libocci.so
Selinux issue solution
I do these commands to allow execution of oracle libraries from PHP environment :
chcon system_u:object_r:textrel_shlib_t *.so
chcon system_u:object_r:textrel_shlib_t *.10.1
But these might not be enough, I only phpinfo results to confirm that oci8 is indeed loaded by PHP environment. Stay tuned for more info after we try this configuration.