I have just set up sqlplus connect to the remote Oracle database and begin to resolve issues with configuring php connection to the same database.
While configuring sqlplus connect , host AVAYAPDSDB was created and used. Right now i was trying to use it in host connection from php and faced to the problem, that appeared to be on this site amoung other users, but not solved or not commented properly.
So. My request is :
$dbh = odbc_connect("DRIVER={Oracle 11g ODBC driver};DSN=AVAYAPDSDB","******","******");
The output in browser trase is that :
Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1' : file not found
I double && triple checked is this .so file at this directory or not, and even tried to move it to less deep directory like /usr/lib & /usr/lib64 with changing route to driver in odbcinst.ini but still with no progress.
here is oracle/lib direcrory:
[root@cc-allplus lib]# ls -l
total 187144
-rw-r--r-- 1 root root 368 Aug 24 2013 glogin.sql
-rw-r--r-- 1 root root 53865194 Aug 24 2013 libclntsh.so.11.1
-rw-r--r-- 1 root root 7996693 Aug 24 2013 libnnz11.so
-rw-r--r-- 1 root root 1973074 Aug 24 2013 libocci.so.11.1
-rw-r--r-- 1 root root 118738042 Aug 24 2013 libociei.so
-rw-r--r-- 1 root root 164942 Aug 24 2013 libocijdbc11.so
-rw-r--r-- 1 root root 1502287 Aug 24 2013 libsqlplusic.so
-rw-r--r-- 1 root root 1469542 Aug 24 2013 libsqlplus.so
-rw-r--r-- 1 root root 1003582 Aug 24 2013 libsqora.so.11.1
-rw-r--r-- 1 root root 2091135 Aug 24 2013 ojdbc5.jar
-rw-r--r-- 1 root root 2739616 Aug 24 2013 ojdbc6.jar
-rw-r--r-- 1 root root 66779 Aug 24 2013 xstreams.jar
Here my ldd of this file :
[root@cc-allplus lib]# ldd /usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1
ldd: warning: you do not have execution permission for `/usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1'
linux-vdso.so.1 => (0x00007fff0ddff000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f25b694b000)
libm.so.6 => /lib64/libm.so.6 (0x00007f25b66c6000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f25b64a9000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f25b6290000)
libclntsh.so.11.1 (0x00007f25b3920000)
libodbcinst.so.1 => /usr/lib64/libodbcinst.so.1 (0x00007f25b3709000)
libc.so.6 => /lib64/libc.so.6 (0x00007f25b3375000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b8fe00000)
libnnz11.so (0x00007f25b2fa7000)
libaio.so.1 => /lib64/libaio.so.1 (0x00007f25b2da6000)
In order not to look too confident, here is my odbcinst.ini that works with sqlplus greatly:
[Oracle 11g ODBC driver]
Description = Oracle ODBC driver for Oracle 11g
Driver = /usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1
Setup =
FileUsage =
CPTimeout =
CPReuse =
Driver Logging = 7
..and odbc.ini :
[AVAYAPDSDB]
Driver = Oracle 11g ODBC driver
DSN = Oracle 11g ODBC driver
ServerName = ccpdsdko
UserID = reporter
Password = reporter
Some people were asking to check if the LD_LIBRARY_PATH was set.. well, mine is set :
[root@cc-allplus lib]# echo $LD_LIBRARY_PATH
:/opt/IBM/informix/lib:/opt/IBM/informix/lib/cli:/opt/IBM/informix/lib/esql:/opt/IBM/informix/lib:/opt/IBM/informix/lib/cli:/opt/IBM/informix/lib/esql:/usr/lib/oracle/11.2/client64/lib/
I would be really thankfull for any help! There are a few posts on this topic on this site, but the last comment in there was dated to 2014.. and issue was not resolved, or not well commented about the solution
sofiles in the oracle directory. Something likechmod ugo+x /usr/lib/oracle/11.2/client64/lib/Rerunlddsee if the warning disappears and then try launching your app. - Michael Petchrootyou can access everything. It is the only reason I can think of that the file can't be found but it is there. - Michael Petch