PHP Extension DLLs are compiled to work in a single version of PHP. The PHP 5.6 DLL will crash in PHP 7, and the PHP 7 will also crash in PHP 7.1. So first make sure that you are using only the correct version in the folder ext
and php.ini
If you also notice that PHP is compiled from two forms in Windows : thread safe and non thread safe . This also influences which extension you should use (again, do not mix garlic with bugs).
Oh, almost forgetting, as of PHP 7 we also have a build for x64 and another for x86. Again, you have to choose the correct version here too.
Assuming you are using the Thread Safe version (which comes with XAMPP / Apache generally), download the latest extension to work with SQL Server. The easiest way is look in the github repository of the driver in the releases part and download only the version you want.
Now support for PHP 7.1 is still in preview, and the latest is this .
Download only the zip for PHP 7.1, choose the architecture, thread safe or not, and extract only them in the ext
folder and enter in php.ini
.
// suporte PDO
extension=php_pdo_sqlsrv_71_ts.dll
// sem PDO
extension=php_sqlsrv_71_ts.dll
Finally, if something goes wrong, you may also need to update Microsoft ODBC Driver 13 for SQL Server . SQL Server Express 2014 uses version 11 must driver for connection, and as a reminder do not know if the new version of the driver for PHP needs you to update ODBC as well.