1

I'm having trouble connecting to a SybaseIQ with PHP

A bit of info about the environment :

  • OS : Debian 8.10 Jessie
  • Web hosting plateform : Plesk
  • PHP : 7.1.8
  • SQL Anywhere php extension : php-7.1.0_sqlanywhere.so
  • SQL Anywhere client : version 17

The error i'm getting :

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

I've tried changing the LD_LIBRARY_PATH though apache2ctl, envvars, and the php command "putenv" but nothing is working.

Does anyone have a bit of experience with the same tools?

Yex777
  • 57
  • 1
  • 7

2 Answers2

0

Do you have this module in /opt/plesk/php/7.1/lib/php/modules/ ?

IgorG
  • 1,181
  • 6
  • 8
  • Hi, we did put it there in the beginning but then moved to where the client is installed (and changed the path in PHP.ini). The extension does load as it is he who is giving us the error. – Yex777 Feb 22 '18 at 10:14
0

"putenv" stores the variable only for a current request. Try using just "env" instead. Verify where required modules are stored and then define it via corresponding "php.ini" or additional PHP directives in Plesk interface, for example:

env[LD_LIBRARY_PATH] = /opt/sqlanywhere12/lib64
Elvis Plesky
  • 3,190
  • 1
  • 12
  • 21