Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

does anyone have some experience in installing the ORACLE PHP extensions (oci_connect()) on Linux SUSE ?

Thank you Antonio

share|improve this question

I did so on SLES 10 and 11 by downloading and adding the SLES SDK to the package-repositories and installing php5-devel. Then you need to download and install the Oracle Instant Client RPMs (oracle-instantclient11.2-devel and oracle-instantclient11.2-basic).

Next create a file /etc/ with the content (assuming you are on x86_64):


This will allow you to load the Oracle libraries from within PHP later on.

Now install the OCI extension by calling pecl install oci8. If asked for the path to the Oracle Instant Client libraries just confirm the default value. if this does not work try to provide /usr/lib/oracle/11.2/client64 as the path.

once installation of oci8 has finished make sure that it's loaded by creating the file /etc/php5/conf.d/oci.ini with this content:

I assume you are using PHP inside Apache so you will have to restart Apache for mod_php5 to load the module. Check with phpinfo() that the module was loaded correctly.

share|improve this answer
Thank you Fladi, I'm just trying now. – AntonioMad Feb 19 '11 at 8:41
I'm stuck at the first point :( is there a way to add SLES SDK without having to download and burn the ISO ? – AntonioMad Feb 19 '11 at 9:00
You can add it as a ISO source in YaST or you can download and mount the ISO: mkdir -p /mnt/sdk/ && mount -o loop /path/to/sdk.iso /mnt/sdk And then add /mnt/sdk as a installation source in YaST. Or you can cherry-pick all the rpms from the ISO and upload the to the machine to install them manually using rpm. – Fladi Feb 21 '11 at 9:52

I also seemed to have had to run ldconfig afterward, then restart apache for oci8 to show up in phpinfo (sles 11 64, php 5.2, apache2)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.