Closed RiccardoFrancescato closed 4 years ago
I believe iSeriesAccess-7.1.0-1.0.x86_64.rpm is for the ODBC drivers. If that's what you want, you probably need the PHP ODBC extension installed as well. in ubuntu I would use sudo apt install php7.x-odbc
. You could try the same in yum but the package name might be different.
I finally found the solution to install IBM ODBC drivers on linux machine. I share with you the solution i've found.
yum install ibm-iaccess-1.1.0.12-1.0.x86_64.rpm
cd /usr/lib64/
ln -s libodbcinst.so.2 /usr/lib64/libodbcinst.so.1
odbc_config --odbcinstini
vi /etc/odbcinst.ini
----- Content of odbcinst.ini ----
[ODBC]
Trace = No
Pooling = No
[IBM i Access ODBC Driver]
Description=IBM i Access for Linux ODBC Driver
Driver=/opt/ibm/iaccess/lib/libcwbodbc.so
Setup=/opt/ibm/iaccess/lib/libcwbodbcs.so
Driver64=/opt/ibm/iaccess/lib64/libcwbodbc.so
Setup64=/opt/ibm/iaccess/lib64/libcwbodbcs.so
Threading=0
DontDLClose=1
UsageCount=1
[IBM i Access ODBC Driver 64-bit]
Description=IBM i Access for Linux 64-bit ODBC Driver
Driver=/opt/ibm/iaccess/lib64/libcwbodbc.so
Setup=/opt/ibm/iaccess/lib64/libcwbodbcs.so
Threading=0
DontDLClose=1
UsageCount=1
-----
vi /etc/odbc.ini
----- Content of odbc.ini ----
[STEALTH]
Description = IBM i Access ODBC driver
Driver = IBM i Access ODBC driver
System =
UserID =
Password =
Naming = 0
-----
This is not a code issue, i have problems installing drivers and php extensions. I have a Centos 7 machine with php 7 and apache running. I have installed ibm_db2 driver and extension through ibm_data_server_driver_package_linuxx64_v11.5.tar.gz and I series client access through iSeriesAccess-7.1.0-1.0.x86_64.rpm. using the following commands:
I have added ibm_db2 extension to the php ini
and setted my laravel connection as follow:
But when i try to connect to the database, laravel returns
Can someone help me figuring out what i'm doing wrong and let the connection working? Thanks in advance.