1. Installing XAMPP
2. Download PHP sqlsrv Extensions
Microsoft Drivers 3.2 for PHP for SQL Server
Official:
http://www.microsoft.com/en-us/download/details.aspx?id=20098
After the download is actually a self-extracting file, extracted from each version of the DLL
3. Check the PHP version in XAMPP
You can use Phpinfo () to view
Create a new file xampp\htdocs\phpinfo.php, save the following code to the file
<? PHP Echo Phpinfo ();? >
Open the XAMPP Control Panel, click the Start button in Apache, and start the Apache server
Browser opens http://localhost/phpinfo.php
4. Copy the DLL into the Xampp\php\ext directory according to the PHP version
I'm here for 5.5, so I'm copying the file "Php_sqlsrv_55_ts.dll"
5. Modify the Xampp\php\php.ini file
Add a row
Extension=xxxx.dll
Xxxx.dll that just copy the past DLL file name, do not need to add a path, simple file name on the line.
I'm copying "php_sqlsrv_55_ts.dll" here.
So I'm adding a line here
Extension=php_sqlsrv_55_ts.dll
6. Installing the ODBC driver
Microsoft ODBC Driver One (or higher) for SQL Server
https://www.microsoft.com/en-us/download/details.aspx?id=36434
Note the 32-bit system downloads the x86 version, and the 64-bit system downloads the x64 version
7. Verify that the installation is correct
Browser opens http://localhost/phpinfo.php
xampp1.8.3 configuring php5.x access to SQL Server 2008