I'm attempting to setup the Microsoft ODBC Driver on platform.sh so that the PDO_SQLSRV and SQLSRV PHP extensions are available to me. apt and other sudo commands are limited. However, during the build I can set environment variables such as LD_LIBRARY_PATH.
Here is what I have tried so far.
- I downloaded https://packages.microsoft.com/ubuntu/16.04/prod/pool/main/m/msodbcsql/ and extracted all of the files from the package.
- I copied the extracted files to the server
- Tried:
export LD_LIBRARY_PATH="($pwd):$LD_LIBRARY_PATH"
andLD_LIBRARY_PATH="($pwd):$LD_LIBRARY_PATH" /usr/sbin/php-fpm7.0
Still, I get the following error:
SQLSTATE[IMSSP]: This extension requires the Microsoft ODBC Driver 13
for SQL Server to communicate with SQL Server. Access the following
URL to download the ODBC Driver 13 for SQL Server for x86:
http://go.microsoft.com/fwlink/?LinkId=163712
Update
All dependencies are met when I execute LD_LIBRARY_PATH=$(pwd) ldd libmsodbcsql-13.1.so.4.0
. However, when I launch with LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" /usr/sbin/php-fpm7.0
I still see the error shown above.