Xammp does not come with the required DLLs for connecting to SQL Server, you need to manually download and copy it to your PHP extensions folder.
You can download latest driver here .
This file is a self-extractor that will extract the DLLs to the directory you choose.
Once this is done, you must choose the appropriate DLL and copy it to the ext
folder of PHP. This MSDN page indicates which DLL you should use according to the PHP version.
XAMPP comes with the Thread Safety (TS) version of PHP. Copy it to the directory xampp\php\ext
to dll php_sqlsrv_XX_ts.dll
, where XX
matches your version of PHP.
Finally, in the configuration file include the DLL line.
extension=php_sqlsrv_XX_ts.dll
Or if you want to use SQL Server with the PDO:
extension=php_pdo_sqlsrv_XX_ts.dll
Note: The latest official version of SQL Server drivers is compatible with PHP 5.4.
If you are using PHP 5.5 or higher, you can turn to a unofficial while Microsoft does not release the new official version and to prioritize the release of the official compatible version.
Update: The official driver has been updated and supports up to the latest stable version of PHP (5.6)