This post hopes to walk you through configuring PHP 5.x to connect to Microsoft SQL Server. These are the steps that we completed to get this working…
- Download unofficial PHP MS SQL extension files from here: https://onedrive.live.com/redir?resid=669EE24817961774%21720
- Extract only the php_sqlsrv_56_ts.dll and php_pdo_sqlsrv_56_ts.dll files to the php\ext folder. Note the ’56’ matches the PHP version installed which is v5.6. If your version differs use the correct numbers that match your PHP version.
- Add the following to the PHP.ini file…
- Test to confirm that driver is now active in PHP by checking phpinfo…
- Download and install the 64-bit version of Microsoft SQL 2012 Native Client… http://go.microsoft.com/fwlink/?LinkID=239648&clcid=0x409
- If using Azure, log on to the Azure Portal and edited the SQL Server – Firewall Setting to allow your IP.