PHP ODBC CAN'T OPEN LIB /usr/dlc/odbc/lib/pgoe1025.so HE

Posted by jmd8045 on 27-Aug-2012 14:37

Can anyone offer some guidance on this issue ????

PHP Fails to load the odbc network client ??

Jim

==================== ERROR MESSAGE       ================================
PHP Warning:  odbc_connect(): SQL error: [unixODBC][Driver       Manager]Can't open lib '/usr/dlc/odbc/lib/pgoe1025.so' : file not       found, SQL state 01000 in SQLConnect

=================== LDD ON SHARED LIBRARY       ===================================
         ldd /usr/dlc/odbc/lib/pgoe1025.so
         linux-vdso.so.1 =>  (0x00007fff9717a000)
         libpthread.so.0 =>       /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f43b81c6000)
         librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1       (0x00007f43b7fbe000)
         libpgicu25.so => not found
         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2       (0x00007f43b7db9000)
         libstdc++.so.6 =>       /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f43b7ab9000)
         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6       (0x00007f43b77be000)
         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6       (0x00007f43b7401000)
         libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1       (0x00007f43b71eb000)
         /lib64/ld-linux-x86-64.so.2 (0x00007f43b877a000)

=================== TEST CODE SNIPPIT       ===============================
function test_odbc($lg)
{
     putenv("ODBCINI=/usr/dlc/odbc/odbc.ini");
     putenv("ODBCINST=/usr/dlc/odbc/odbcinst.ini");
     putenv("LD_LIBRARY_PATH=/usr/dlc/lib:/usr/dlc.odbc/lib");

     $lg->logEvent("ATTEMPT CONNECTION ...");
     $db = new db_odbc("intrader",
                       "",
                       "",
                       "",
                       "",
                       "",
                       "odbc"
                       );
}

============================= END TEST CODE SNIPPET       ====================

============================= ODBC.INI       ==============================
[ODBC Data Sources]
;------------------------------------------------------------------------------------------
; REVIVE CONSULTING LLC.
;------------------------------------------------------------------------------------------
; $Id: odbc.ini,v 1.3 2012/08/27 17:09:50 jmd Exp $
;------------------------------------------------------------------------------------------
; $Log: odbc.ini,v $
; Revision 1.3  2012/08/27 17:09:50  jmd
; development update
;
; Revision 1.2  2012/08/27 12:10:33  jmd
; development update
;
;------------------------------------------------------------------------------------------
;mystest is the Data Source Name (DSN) and could be any name you       choose. Each DSN should be unique.
;you can have multiple data sources. For each one you should       create a configuration section below.
;------------------------------------------------------------------------------------------
intrader=Progress_V100A

[intrader]
;QEWSD=38657
;------------------------------------------------------------------------------------------
; Driver is the path to the shared library containing the Progress       driver.
; Replace with the complete path to your version of the ODBC       driver in $DLC/odbc/lib.
; The shared library is named after the following pattern:
;------------------------------------------------------------------------------------------

Driver=/usr/dlc/odbc/lib/pgoe1025.so
;------------------------------------------------------------------------------------------
; PortNumber is the port number where the SQL broker is listening.       If you don't use separate brokers
; for 4GL and SQL, this is the same port number as the -S       parameter.
;------------------------------------------------------------------------------------------

PortNumber=15301
;------------------------------------------------------------------------------------------
;HostName is the name of the host where the database server is       running. Use "localhost" if
; the database is running locally. This setting should match       database parameter -H.
;------------------------------------------------------------------------------------------

HostName=170.132.235.40

DatabaseName=trading1

;------------------------------------------------------------------------------------------
;LogonID can be an account set up for the database if security is       enabled.
; You may also use your logon account with the password blank.
; The default SQL dba is the user who created the database.
; This account should be used to gain full access to tables and       users for the SQL part of the database.
;------------------------------------------------------------------------------------------

LogonID=odbc01
Password=odbc01

;------------------------------------------------------------------------------------------
; The default values for the following options are acceptable in       most configurations. Refer
; to the documentation if you need to change them.
;------------------------------------------------------------------------------------------
;APILevel=1
;ConnectFunctions=YYN
;CPTimeout=60
;DriverODBCVer=03.60
;FileUsage=0
;SQLLevel=0
;UsageCount=1
;ArraySize=50
;DefaultLongDataBuffLen=2048
;DefaultIsolationLevel=REPEATABLE READ
;StaticCursorLongColBuffLen=4096



[ODBC]
;------------------------------------------------------------------------------------------
; the ODBC section is generic and not specific to       Progress/OpenEdge. It pertains to
; the standard ODBC framework (shared among ODBC drivers).
; A copy of the standard ODBC framework libraries is included with       Progress/OpenEdge;
; use th.is if you do not have another ODBC environment already in       use on the system.
;------------------------------------------------------------------------------------------
; InstallDir is the root path to the ODBC framework. $DLC/odbc is       not an acceptable path, use the absolute path..
;------------------------------------------------------------------------------------------
InstallDir=/usr/dlc/odbc
;------------------------------------------------------------------------------------------
; Use Trace=1 to enable an ODBC trace. This requires a path to a       log file (TraceFile)
; and a path to a tracing library
; (included with Progress/OpenEdge in $DLC/lib/odbctrac.so, be       sure to use the absolute
; path in the configuration)
;------------------------------------------------------------------------------------------


Trace=1
TraceFile=/tmp/odbctrace.out
TraceDll=/usr/dlc/odbc/lib/pgtrc25.so

[Default]
Database=intrader
DatabaseName=intrader
LogonId=odbc01
Password=odbc01
ServerName=170.132.235.40
PortNumber=15301
Driver=/usr/dlc/odbc/lib/pgoe1025.so
UseCursorLib=0

================= ODBCINST =============================

[ODBC Drivers]
Progress OpenEdge 10.25 Driver=Installed

[Progress OpenEdge 10.25 Driver]
Driver=/usr/dlc/odbc/lib/pgoe1025.so]

================= END ODBCINST ==========================

All Replies

Posted by jmd8045 on 27-Aug-2012 15:31

FOUND THE SOLUTION:

ln -s /usr/dcl/odbc/*so /usr/lib64/*so

If you create symbolic links or for that matter copy them to the /usr/lib64 directory you will find that all the sudden PHP has no

problems loading them. The clue was in a previous post for CENTOS.

Jim

This thread is closed