Mi configuración en PHP 8
Problemas con UAC
Download SQLSRV59.EXE from Microsoft Drivers 5.9 for PHP for SQL Server is the latest general availability (GA) version
You will have to execute the file that you download and later copy the .dll files that correspond to the version you require inside the folder
C:\xampp\php\ext
I copy the next files (my windows is x64 and PHP 8.0.3)
php_pdo_sqlsrv_80_nts_x64.dll php_pdo_sqlsrv_80_ts_x64.dll php_sqlsrv_80_nts_x64.dll php_sqlsrv_80_ts_x64.dll
In this download you will find .dll x86 and x64
php_pdo_sqlsrv73 php_pdo_sqlsrv74 php_pdo_sqlsrv80
I installed the Microsoft SQL Management Studio 18 but in case of not installing it you will need the
Microsoft ODBC Driver 17 for SQL Server
In the window XAMPP Control Panel search the CONFIG button the Apache Module, and select the option PHP (php.ini)
add this lines (according to the names of the .dll files that you copied inside the folder)
SEARCH in php.ini the section EXTENSIONS
; Mi CONFIGURACIÓN SQL SERVER extension=php_pdo_sqlsrv_80_nts_x64.dll extension=php_pdo_sqlsrv_80_ts_x64.dll extension=php_sqlsrv_80_nts_x64.dll extension=php_sqlsrv_80_ts_x64.dll
save the file and restart the apache server. press the stop button and then start