我正在尝试连接到外部服务器上的 SQL Anywhere 数据库。我正在使用 VPS Linux。
正在关注 documentation当我运行命令 ./bin32/sa_config.sh
时出现此错误。
-bash: ./bin32/sa_config.sh: Permission denied
权限是:-rw-r--r-- 1 root root 1201 Sep 10 14:50 sa_config.sh
。
当我从 bin64
运行配置时也是如此。
在 phpinfo()
中我有错误:
SQLAnywhere client version The SQLAnywhere client libraries could not be loaded. Please ensure that libdbcapi_r.so can be found in your LD_LIBRARY_PATH environment variable.
我将这一行添加到 /etc/init.d/httpd
:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/sql_anywhere/
然后我将 libdbcapi_r.so
和 libdblib12_r.so
复制到了这个位置。我尝试了 lib32
和 lib64
中的那些文件。
我将位置添加到 php.ini
中的 php-5.x.y_sqlanywhere_r.so
并自动运行它。
如何使 SQL Anywhere 工作?
您需要像这样运行 sa_config.sh 文件:
. <path>sa_config.sh
注意 .
和文件名之间的空格。这将允许脚本更改当前 shell 中的环境变量。
我是一名优秀的程序员,十分优秀!