Library error when configuring PHP with OCI8
621988Feb 7 2008 — edited Feb 11 2008I'm running into a problem running the configure command to include OCI8 in our Linux PHP in order to connect to a remote Oracle database. I've been following the instructions on the page:
http://www.oracle.com/technology/pub/notes/technote_php_instant.html
We have a CentOS 4.6 server:
* 2.6.9-67.0.4.ELsmp
* Apache Apache/2.0.52
* PHP 4.x
I've downloaded the latest PHP we can get for 4.x (4.4.8). I can compile and install the default PHP 4.4.8 without issue. However, trying to configure the OCI8 runs into problems:
I've added the types to the httpd.conf file and installed the rpms:
oracle-instantclient-basic-11.1.0.1-1.i386.rpm
oracle-instantclient-devel-11.1.0.1-1.i386.rpm
I'm unsure if 4.4.8 config.m4 is correct -- but if we try to use the php_oci8c_buildpatch, it fails, so I went with the default config.m4 in PHP 4.4.8.
I try to configure with the command:
./configure with-oci8-instant-client prefix=/usr/local/bin/php with-apxs2 enable-sigchild --with-config-file-path=/etc/httpd/conf
...and get the error it can't find the libraries:
checking for Oracle (OCI8) support using ORACLE_HOME installation... no
checking for Oracle (OCI8) support using Oracle Instant Client... yes
checking Oracle Instant Client directory... /usr/lib/oracle/11.1.0.1/client/lib
checking Oracle Instant Client SDK header directory... /usr/include/oracle/11.1.0.1/client
checking Oracle Instant Client version... configure: error: Oracle Instant Client libraries not found
Yet, when I look at the directory where it says it is looking, I see the libraries:
# ls -l /usr/lib/oracle/11.1.0.1/client/lib
total 124160
lrwxrwxrwx 1 root root 17 Feb 6 14:35 libclntsh.so -> libclntsh.so.11.1
-rw-r--r-- 1 root root 35295891 Aug 1 2007 libclntsh.so.11.1
-rw-r--r-- 1 root root 5839373 Aug 1 2007 libnnz11.so
lrwxrwxrwx 1 root root 15 Feb 6 14:35 libocci.so -> libocci.so.11.1
-rw-r--r-- 1 root root 2331572 Aug 1 2007 libocci.so.11.1
-rw-r--r-- 1 root root 79215373 Aug 1 2007 libociei.so
-rw-r--r-- 1 root root 129285 Aug 1 2007 libocijdbc11.so
-rw-r--r-- 1 root root 1879924 Aug 1 2007 ojdbc5.jar
-rw-r--r-- 1 root root 1977444 Aug 1 2007 ojdbc6.jar
-rw-r--r-- 1 root root 299640 Aug 1 2007 ottclasses.zip
Can anyone shed some light on what I'm missing? I've searched, poked, and prodded -- but am unable to find a solution.
Thanks!
Keith