- Find the versions of the operating system that PHP is running on, the PHP version and the Microsoft SQL Server version.
- Consult the support matrix to find out which version Microsoft PHP Drivers you need. For example if you have PHP 7.2, and SQL Server 2017, then you’ll need Microsoft PHP Drivers version 5.3.
- Download and install the Microsoft PHP Drivers on the PHP server. There are guides for some OSs at the bottom of this page that can guide you through the installation of the latest versions.
- Enable the PHP extensions: pdo_sqlsrv and sqlsrv.
If you have done everything correctly you can run the command “php -m” to show which module are installed. If it’s working, you should see that sqlsrv and pdo_sqlsrv are included in the output.