If you are using Oracle-XE for database with Apache and PHP you need to install php-oci8 module. It is difficult to find any .deb for php-oci8 which would run with PHP 5.3 and Oracle-XE. Somehow they dont like each other. Also, if you try to compile using pecl, it throws up errors. To work around this problem, you need to download and install Oracle Instant Client Basic 11g and then compile php-oci8 using pecl. Once you install Oracle Instant Client Basic 11g, the installation of php-oci8 becomes fairly simple.
Download the Oracle Instant Client Basic 11g from the Oracle website. Generally all firefox downloads are in the Downloads folder. Now, we need to extract the file into /opt
sudo unzip ~/Downloads/oracle-instant-client-basic-11-2.zip -d /opt
Now, install pecl using the following command
sudo apt-get install php-pear
After installation, use the following command to install php-oci8. Note: you must have php-dev and php-cli installed.
sudo pecl install php-oci8
After customary config checks, it will ask you for the oracle installation path. set the path manually to /opt/oracle/instantclient_11_2 in the following way
instantclient,/opt/oracle/instantclient_11_2
Thats it. php-oci8 will be installed. Now you can use Oracle-XE with php-oci8 in Ubuntu 10.04.
Update:
After installing, create a new file oci8.ini in /etc/php5/conf.d/ and in that add the following
[oci8] extension=oci8.so
This same procedure will work in Fedora 12 and above , except ,you will have to create the oci8.ini file in /etc/php.d/ instead.
Pingback: Installing php-oci8 with Oracle-XE in Ubuntu 10.04 x86-64 « DbRunas – Noticias y Recursos sobre Bases de Datos
Pingback: Installing php-oci8 with Oracle-XE in Ubuntu 10.04 x86-64 « Linux …
Pingback: Installing php-oci8 with Oracle-XE in Ubuntu 10.04 x86-64 « Linux … « php
Pingback: Webby Scripts Installing php-oci8 with Oracle-XE in Ubuntu 10.04 x86-64 « Linux …
Pingback: Installing php-oci8 with Oracle-XE in Ubuntu 10.04 x86-64 « Linux … » KHMER855.COM
Pingback: educational-scholarships.realna.net
Pingback: DC Guide
Pingback: educational-scholarships.realna.net
thanks.
Pingback: Installing php-oci8 with Oracle-XE in Ubuntu 10.04 x86-64 | Ubuntu-News - Your one stop for news about Ubuntu
hallo my friend’s.. you have a nice post..
let’s take some ideas about indonesian
news on my web.. have a nice day..!!! 10:30
It’s Nice Post, keep posting and have a nice day… 10:40
Pingback: Oracle, PHP5 and Apache 2.2 installation of oci8 functionality on ubuntu 10.04 x86_64 « Nevtech Blog
Thanks, just one thing. I was following your steps to install php-oci8 and I’ve found that the line
sudo pecl install php-oci8
Returns following error
In my installation, with Ubuntu 10.04 x86 server, the correct command is:
sudo pecl install oci8
And before doing it, remember to install php-dev with
sudo apt-get install php5-dev