I'm trying to connect to db2 database, trought symfony php app, via ODBC driver, and db2 installed driver (IBM Data Server Driver Package v11.5 ). I'm on MAC OS 10.15 CATALINA, with APACHE, and PHP reinstalled with brew.
I stuck at this error:
SQLSTATE[01000] SQLDriverConnect: 0 [unixODBC][Driver Manager]Can't open lib 'IBMDB2' : file not found
Where IBMDB2 refers to the DSN of my odbc driver, linked to the driver installed to /Applications/dsdriver/lib/libdb2.dylib
Could you please help me to solve this "file not found" error (of course file exist in /Applications/dsdriver/lib/libdb2.dylib) ?
This is my /Library/ODBC/odbc.ini file:
[ODBC Data Sources]
IBMDB2 = IBM i Access ODBC Driver
[IBMDB2]
Driver = /Applications/dsdriver/lib/libdb2.dylib
This is my /Library/ODBC/odbcinst.ini file:
[IBM i Access ODBC Driver]
Description=IBM i Access ODBC Driver
Driver=/Applications/dsdriver/lib/libdb2o.dylib
Setup=/Applications/dsdriver/lib/libdb2o.dylib
This is result of "env" command
TMPDIR=/var/folders/8_/l5_n27ds14ndr7tmw0dg97jr0000gn/T/
XPC_FLAGS=0x0
LaunchInstanceID=57ABF727-826C-4D96-9032-BDBB8637FFD6
TERM=xterm-256color
LANG=fr_FR.UTF-8
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.E2JaUTZ9TW/Listeners
SECURITYSESSIONID=186a6
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=433
TERM_SESSION_ID=AA52FB63-601C-4003-8275-6C3E365531DD
SHELL=/bin/zsh
HOME=/Users/yornletard
LOGNAME=yornletard
USER=yornletard
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Users/yornletard
OLDPWD=/Users/yornletard
ODBCINI=/Library/ODBC/odbc.ini
ODBCINSTINI=/Library/ODBC/odbcinst.ini
_=/usr/bin/env
IBM i access
product that you have installed. Can you also confirm that the target Db2-database lives on the AS/400 (i-series) ? – maoIBM i access
product, with the unixODBC. In the INI files, Don't reference the files from the IBM data server driver (as they require a Db2-connect licence file to connect to AS/400), which theIBM i access
libraries do not need. Your configuration is not valid. – mao