To check the compatible version of MS SQL drivers for your PHP, click here.
2. To download the drivers for PHP, click here. Select the appropriate version and click Next.
Note: As we are using PHP 5.6, we have downloaded version 3.2.
3. It will prompt you to save the exe file. Click on Save File.
4. Once the drivers are downloaded, run the exe file. It will ask for the path to extract. Provide the path and click on Ok.
5. Go to the extracted folder and copy the NTS (for Windows) dll files to the PHP extension folder.
Note: As we are using PHP 5.6, we have copied the files to C:\Program Files (x86)\PHP\v5.6\ext
php_sqlsrv__56_nts.dll
php_pdo__sqlsrv_56_nts.dll
6. Once the files are copied, we need to add the following extension in the php.ini file.
php_sqlsrv__56_nts.dll
php_pdo__sqlsrv_56_nts.dll
7. Create a phpinfo file and check if the extensions are shown properly. To create a phpinfo file, follow the instructions here.
That's it. Now you will be able to access the MS SQL database from PHP.