on 2021 Nov 23 12:58 AM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
9 | |
9 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.