You will need some . dll files that you can find in the following link:
https://www.microsoft.com/en-us/download/details.aspx?id=20098
Since your PHP is 5.6, Download SQLSRV32 File.
After downloading the file, you will extract it, there you will have the necessary dlls.
use phpinfo(), to check which PHP Extension Build. .
in the case of the example you will have to copy the dlls that have _ts.dll from php 5.6, i.e.:
php_pdo_sqlsrv_56_ts.dll and php_sqlsrv_56_ts.dll,
Copy these files to their directories,
C:/.../php/ext and also for C:/windows/system32/ and/or C:/windows/Syswow64 if you are already a 64bit computer.
Once this is done you should open php.ini and in the Extension session you should add the following lines:
Extension=php_sqlsrv_56_ts.dll
Extension=php_pdo_sqlsrv_56_ts.dll
and remove ";" from line Extension=php_pdo_odbc.dll, if still commented.
It will also be necessary to install Microsoft® ODBC Driver for SQL Server[Native Client] which will depend on your database in case as an example I will pass the link of Microsoft® ODBC Driver 11 to SQL Server.
https://www.microsoft.com/pt-br/download/details.aspx?id=36434
After installing the previous steps. you should restart apache.
if everything is correct you can access phpinfo() again and search for sqlsrv
and then by pdo_sqlsrv
(source: synet.sk)
hope I’ve helped.
I was able to connect using pdo_odbc, but I felt that the connection is a little slow.
– Rayan Pereira de Lima
Related: http://answall.com/questions/175222/n%C3%A3o-estou-conseguir-configurar-os-drivers-do-sqlsrv-no-php7/175226#175226
– novic
As I understand it, the problem in this case is that Windows 10 needs at least version 4.0 of the driver and PHP 5.6 requires version 3.2 of the driver. More information here: https://www.dirceuresende.com/blog/howto connect to no-sql-server-using-o-php-xampp-e-o-driver-pdo-windows/
– Claudio Shigueo Watanabe