0

I'm trying to connect to SQL Anywhere database on external server. I'm working on VPS Linux.

Following documentation when I run command ./bin32/sa_config.sh I get this error.

-bash: ./bin32/sa_config.sh: Permission denied

Permission are: -rw-r--r-- 1 root root 1201 Sep 10 14:50 sa_config.sh.
The same is when I run config from bin64.

In phpinfo() I have error:

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. 

I added this line to /etc/init.d/httpd:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/sql_anywhere/

And to this location I copied libdbcapi_r.so and libdblib12_r.so. I tried those files from lib32 and lib64.

I add location to php-5.x.y_sqlanywhere_r.so in php.ini and line to run it automatically.

How to make SQL Anywhere working?

miszczu
  • 1,179
  • 4
  • 19
  • 39

1 Answers1

1

You need to run the sa_config.sh file like this:

. <path>sa_config.sh

Note the space between the . and the filename. That will allow the script to change environment variables in the current shell.

Graeme Perrow
  • 56,086
  • 21
  • 82
  • 121