运行为www-data(apache)时,odbc_connect找不到PervasiveSQL驱动程序

I'm trying to connect to a PervasiveSQL 11 (running on Windows) via PHP 7 on Ubuntu. But, the odbc_connect function fails with the following error message

Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/usr/local/psql/lib64/libodbcci.so' : file not found, SQL state 01000 in SQLConnect in

I found a previous StackOverflow question with a similar problem. However, that solution doesn't seem to be working for me.

I have tried adding the following to /etc/apache2/envvars, but then I get an error when trying to restart apache

export PVSW_ROOT=/usr/local/psql
export PATH=$PVSW_ROOT/bin:/bin:/usr/bin
export LD_LIBRARY_PATH=$PVSW_ROOT/lib:$PVSW_ROOT/lib64:$PVSW_ROOT/bin:/usr/lib
export MANPATH=$PVSW_ROOT/man:$MANPATH
export BREQ=$PVSW_ROOT/lib
export LD_BIND_NOW=1

(Error on restarting apache with above in envvars):

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

Result of systemctl status apache2.service:

Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.2.load: Cannot load /usr/lib/apache2/modules/libphp7.2.so into server: /usr/local/psql/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.60)