MSSQL drivers installation for PHP 8.2

Hello everyone! I want to install mssql drivers for php 8.2 on my Rocky Linux 9.3

Tryed to do next steps:

dnf install -y epel-release
dnf install -y unixODBC-dev
dnf install -y php-pdo php-pear php-devel gcc-c++ make

Then installed Microsoft ODBC Drivers like described on this page
https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server
using variant for REHL

Then ran

pecl install sqlsrv pdo_sqlsrv

but got error:
/usr/bin/ld: cannot find -lltdl

If I tryes to install lltdl it says that package already installed.

How it can be solved?
Could you please provide a link with clear and complete instructions on how to install MSSQL support for PHP 8.2 ?

You probably need libtool-ltdl-devel

For Microsoft SQL access, I recommend reading: Microsoft SQL Server from PHP

Notice that my repository provides most extensions, including sqlsrv ones.

3 Likes

Work solution for me
Remi repo +

sudo yum install php-sqlsrv