title: Oracle ODBC unixODBC][Driver Manager]Can't open lib
body: <p>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.</p>
  
  <p>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. </p>
  
  <p>So. My request is :</p>
  
  <pre><code>$dbh = odbc_connect("DRIVER={Oracle 11g ODBC driver};DSN=AVAYAPDSDB","******","******");
  </code></pre>
  
  <p>The output in browser trase is that : </p>
  
  <pre><code>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
  </code></pre>
  
  <p>I double &amp;&amp; triple checked is this .so file at this directory or not, and even tried to move it to less deep directory like <strong>/usr/lib</strong>   &amp;   <strong>/usr/lib64</strong> with changing route to driver in odbcinst.ini  but still with no progress.</p>
  
  <p>here is oracle/lib direcrory: </p>
  
  <pre><code>[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
  </code></pre>
  
  <p>Here my ldd of this file :</p>
  
  <pre><code>[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 =&gt;  (0x00007fff0ddff000)
          libdl.so.2 =&gt; /lib64/libdl.so.2 (0x00007f25b694b000)
          libm.so.6 =&gt; /lib64/libm.so.6 (0x00007f25b66c6000)
          libpthread.so.0 =&gt; /lib64/libpthread.so.0 (0x00007f25b64a9000)
          libnsl.so.1 =&gt; /lib64/libnsl.so.1 (0x00007f25b6290000)
          libclntsh.so.11.1 (0x00007f25b3920000)
          libodbcinst.so.1 =&gt; /usr/lib64/libodbcinst.so.1 (0x00007f25b3709000)
          libc.so.6 =&gt; /lib64/libc.so.6 (0x00007f25b3375000)
          /lib64/ld-linux-x86-64.so.2 (0x0000003b8fe00000)
          libnnz11.so (0x00007f25b2fa7000)
          libaio.so.1 =&gt; /lib64/libaio.so.1 (0x00007f25b2da6000)
  </code></pre>
  
  <p>In order not to look too confident, here is my odbcinst.ini that works with sqlplus greatly:</p>
  
  <pre><code>[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
  </code></pre>
  
  <p>..and odbc.ini :</p>
  
  <pre><code>[AVAYAPDSDB]
  Driver = Oracle 11g ODBC driver
  DSN = Oracle 11g ODBC driver
  ServerName = ccpdsdko
  UserID = reporter
  Password = reporter
  </code></pre>
  
  <p>Some people were asking to check if the LD_LIBRARY_PATH was set.. well, mine is set :</p>
  
  <pre><code>[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/
  </code></pre>
  
  <p>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</p>