How to install Microsoft drivers for PHP for SQL Server on Amazon Linux AMI

I am trying to install Microsoft Drivers for PHP for SQL Server using a document provided by Microsoft. Link https://github.com/Microsoft/msphpsql

It provides installation steps for Ubuntu and Redhat, but not for Amazon Linux. To install Microsoft drivers on Amazon, I followed the steps for Redhat (not sure if this is correct). When i run the command

sudo ACCEPT_EULA=Y yum install msodbcsql mssql-tools

got an error below

Error: Package: msodbcsql-13.1.7.0-1.x86_64 (packages-microsoft-com-prod)
           Requires: unixODBC >= 2.3.1
           Available: unixODBC-2.2.14-14.7.amzn1.i686 (amzn-main)
               unixODBC = 2.2.14-14.7.amzn1

The error clearly indicates that the unixODBC version must be> = 2.3.1 to install msodbcsql. But the updated / latest unixODBC package available for amazon is unixODBC-2.2.14.

I need help installing Microsoft drivers for PHP on Amazon Linux so that I can use the PHP Sqlsrv functions to connect the SQL server.

PHP7, Apache SQL .

+1
1

.

sudo ACCEPT_EULA=Y yum install msodbcsql mssql-tools

sudo ACCEPT_EULA=Y yum install msodbcsql-13.0.1.0-1 mssql-tools-14.0.2.0-1

.

+2

Source: https://habr.com/ru/post/1678534/


All Articles