user2361204
user2361204

Reputation: 11

Can't open lib '/opt/ibm/iSeriesAccess/lib64/… : file not found?

I am connecting to IBM AS 400 server through php. The ODBC drivers are properly installed and i can do everything from browser.

But when i execute a php file on linux terminal (php -f filename.php), cause i want to schedule it for daily execution, I get below error :

Can't open lib '/opt/ibm/iSeriesAccess/lib64/libcwbodbc… : file not found

I had the same error before when i was installing the drivers for the first time and i solved it by adding below line in /etc/apache2/envvars: export LD_LIBRARY_PATH=/opt/ibm/iSeriesAccess/l…

In short, as far as ODBC drivers are concerned, all's ok. I have 3 linux web servers and all db2 scripts run just fine but when i execute any php file on terminal with odbc connection, I get the above mentioned error.

Please help !

Upvotes: 1

Views: 3233

Answers (1)

James Allman
James Allman

Reputation: 41188

Add iSeries Access to the system shared library configuration:

echo "/opt/ibm/iSeriesAccess/lib64" > /etc/ld.so.conf.d/iSeriesAccess.conf

and rebuild the cache:

/sbin/ldconfig

Upvotes: 4

Related Questions