If you want to connect to an Oracle database with PHP you will need the pecl module named oci8
First in order to compile it you will need Oracle Instant Client ( both basic & sdk ) . You can download them from here:
If you don’t have an Oracle account you will need to create one.
At the time of this post the following files are available: instantclient-basic-linux32-126.96.36.199.zip , instantclient-sdk-linux32-188.8.131.52.zip .
Create a directory in /opt mkdir /opt/oracle/instantclient and copy those files there . Then unzip them . You will need to create a symbolic link ln -s libclntsh.so.11.1 libclntsh.so
Then you will need to install libaio if you don’t have it already . Don’t forget to add /opt/oracle/instantclient/instantclient_11_2 to /etc/ld.so.conf .
At this point you are ready to install the pecl extension to php.Create a temporary directory ( /tmp/1 ) and cd there.
pecl download oci8
tar xf oci8-1.3.5.tar
edit /etc/php.ini and add
And enjoy oracle extension for php. Note: if you have apache running restart it.