linux - SQL Anywhere 不适用于 VPS

标签 linux sqlanywhere

我正在尝试连接到外部服务器上的 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.solibdblib12_r.so 复制到了这个位置。我尝试了 lib32lib64 中的那些文件。

我将位置添加到 php.ini 中的 php-5.x.y_sqlanywhere_r.so 并自动运行它。

如何使 SQL Anywhere 工作?

最佳答案

您需要像这样运行 sa_config.sh 文件:

. <path>sa_config.sh

注意 . 和文件名之间的空格。这将允许脚本更改当前 shell 中的环境变量。

关于linux - SQL Anywhere 不适用于 VPS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12355044/

相关文章:

c++ - 为什么 `/usr/include` 不在 gcc 默认搜索路径中

linux - Postfix 将所有收到的邮件收集到一个帐户中

java - 指向 env var 的 jboss 缓存位置

sql - 使用类似 sql 任何地方查询的情况时出错

SqlAnywhere 的 Node.js 驱动程序 - 超出准备语句

Java - Oracle - XML 时区

c - getgrnam() 无明显原因导致错误?

sql - 当您没有唯一键时,如何删除sybase中的重复行?

database - SQL Anywhere 中的表详细信息?

inno-setup - 在另一个进程中打开文件时,Inno Setup LoadStringFromFile 失败