cancel
Showing results for 
Search instead for 
Did you mean: 

libdbcapi.so can be found in your LD_LIBRARY_PATH environment variable

0 Kudos
37,768

OS : Ubuntu server 20.04.3 LTS Nginx version: nginx/1.18.0 (Ubuntu) PHP version: PHP 7.4.3 SQL Anywhere : SQL Anywhere 17 (client)

The SQLAnywhere client libraries could not be loaded. Please ensure that libdbcapi.so can be found in your LD_LIBRARY_PATH environment variable.

i have configured the php extension. i have installed sqlanywhere 17 client. i have set the environment. the error still appears.

https://drive.google.com/file/d/1BPuSUaaIBlLoNcJmUT3Y3IKpmR1VLDAb/view https://drive.google.com/file/d/1eWuD2enOhGHijOOfq84ePUMACTpvfQZ3/view https://drive.google.com/file/d/1FdDGX3geVllbFPyMrqLAI9Jkt3AFvT6X/view

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Solve

I set Environment to /etc/bash.bashrc (add code below)

#SQLANY17="/opt/sqlanywhere17"
#export SQLANY17
#[ -r "$HOME/.sqlanywhere17/sample_env64.sh" ] && . "$HOME/.sqlanywhere17/sample>
#[ -z "${SQLANYSAMP17:-}" ] && SQLANYSAMP17="/opt/sqlanywhere17/samples"
#export SQLANYSAMP17
#PATH="$SQLANY17/bin64:$SQLANY17/bin32:${PATH:-}"
#export PATH
#NODE_PATH="$SQLANY17/node:${NODE_PATH:-}"
#export NODE_PATH
#LD_LIBRARY_PATH="$SQLANY17/lib32:${LD_LIBRARY_PATH:-}"
#LD_LIBRARY_PATH="$SQLANY17/lib64:${LD_LIBRARY_PATH:-}"
#export LD_LIBRARY_PATH

i copy all file in /opt/sqlanywhere17/lib64 to /usr/lib/x86_64-linux-gnu

i copy all file in /opt/sqlanywhere17/bib64 to /usr/bin

i edit /etc/php/7.4/fpm/pool.d/www.conf (add code below)

#clear_env = no

#env[SQLANYSAMP17] = /opt/sqlanywhere17/samples
#env[SQLANY17] = /opt/sqlanywhere17
#env[PATH] = /opt/sqlanywhere17/bin64:/opt/sqlanywhere17/bin32:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
#env[LD_LIBRARY_PATH] = /opt/sqlanywhere17/lib64:/opt/sqlanywhere17/lib32
#env[NODE_PATH] = /opt/sqlanywhere17/node
chris_keating
Product and Topic Expert
Product and Topic Expert
0 Kudos

Are those environment changes visible to PHP? For example, does phpinfo() confirm that the library path includes the SQL Anywhere directories? Did you restart the web server (assuming that is being used for testing) to pick up the changes? Have you tried setting either the webserver or PHP configuration files to source the SQLA environment?