odbc_connect not working with FPM but works in CLI

Discussão em 'StackOverflow' iniciado por fdantas, Setembro 2, 2020.

  1. fdantas

    fdantas Administrator Moderador

    I am trying to connect to a Progress database using PHP. For that I am using odbc_connect function, like this :

    $conn_id = odbc_connect('Progress OpenEdge Wire Protocol', 'user', 'pass');


    My webserver is using a Ubuntu 18.04 with php7.3-fpm and Nginx. It runs both php-fpm and nginx as www-data (by default). When a access my app with the browser (so it uses nginx/fpm) I get this error :


    Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/opt/Progress/DataDirect/Connect64_for_ODBC_71/lib/ddoe27.so' : file not found, SQL state 01000 in SQLConnect
    ​

    When I am executing the same code with the cli (and the www-data user) it is working. I have my env vars set properly in both cli and fpm (LD_LIBRARY_PATH, ODBCINI, ODBCINST).

    Any idea ?

    Continue reading...

Compartilhe esta Página