on 2015 Jan 17 3:19 PM
Hi,
My stack is:
Ubuntu 14.04 x64 (headless - shell access only) SQL Anywhere 16 Developer Edition (I believe build 2043) (sqla16developerlinux.tar.gz, md5: 3e64a95cfb5704553a070d81d4195369) PHP Version 5.5.9-1ubuntu4.5 nginx web server
I can get the SA16 PHP extension loading successfully, but when I activate libdbcapi.so, the PHP script crashes PHP and the browser shows "502 Bad Gateway" error from nginx.
Here are the steps I've done:
A. Created PHP script that executes phpinfo() and verified it runs successfully from my browser. This shows that the PHP/nginx part of the installation is working.
B. Copied the newest sa16 php extension files to the PHP extension directory, added the appropriate entry to php.ini, and restarted php:
sudo cp /opt/sqlanywhere16/lib64/php-5.5.0_sqlanywhere*.so /usr/lib/php5/20121212/ sudo vim /etc/php5/fpm/php.ini <added the following line> extension=php-5.5.0_sqlanywhere.so sudo service restart php5-fpmReloaded the browser window and now phpinfo() shows sqlanywhere loaded successfully, but without access to libdbcapi.so:
PHP SQLAnywhere driver version: 2.0.13.1 SQLAnywhere client version: The SQLAnywhere client libraries could not be loaded. Please ensure that libdbcapi.so can be found in your LD_LIBRARY_PATH environment variable.C. Created a new .conf file for ldconfig pointing to /opt/sqlanywhere16/lib64, updated ldconfig and restarted php:
sudo vim /etc/ld.so.conf.d/sqlanywhere.conf <with the single line> /opt/sqlanywhere16/lib64 sudo ldconfig sudo service restart php5-fpm
502 Bad Gateway
I suspect this may be some sort of version mismatch problem, but I'm using only the files that came with the distro. Does anyone have a suggestion as to what I might try next?
UPDATE:
As a final step, I needed to add an entry to /etc/php5/fpm/pool.d/www.conf and restart php:
sudo vim /etc/php5/fpm/pool.d/www.conf <add the line> env[LD_LIBRARY_PATH] = /opt/sqlanywhere12/lib64 sudo service restart php5-fpm
Now things work properly!
Thanks, Terry
Request clarification before answering.
Probably not cool to answer one's own question, but I did figure out the problem.
As a final step, I needed to add an entry to /etc/php5/fpm/pool.d/www.conf and restart php:
sudo vim /etc/php5/fpm/pool.d/www.conf <add the line> env[LD_LIBRARY_PATH] = /opt/sqlanywhere12/lib64 sudo service restart php5-fpmI will edit the original post appropriately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is perfectly cool to answer your own question; this is not StackOverflow, there are no Antwort Betreuer squads here.
Antwort Betreuer
So that's another expression borrowed from German? Is that supported by SAP?
Volker the Besserwisser
User | Count |
---|---|
82 | |
29 | |
9 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.