Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

Thank you Antonio

share|improve this question
add comment

2 Answers

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
add comment

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/ld.so.conf.d/oracle.conf with the content (assuming you are on x86_64):

/usr/lib/oracle/11.2/client64/lib/

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:

extension=oci8.so

I assume you are using PHP inside Apache so you will have to restart Apache for mod_php5 to load the oci8.so 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
add comment

Your Answer

 
discard

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.