does anyone have some experience in installing the ORACLE PHP extensions (oci_connect()) on Linux SUSE ?
Thank you Antonio
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.
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
.
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)