PHP 7.1 with Win 10, XAMPP & SQLSRV Driver

PHP 7.1 with Win 10, XAMPP & SQLSRV Driver

​If you're trying to use XAMPP on Windows and connect to a SQL server using PHP, hopefully the following will help.


Firstly download XAMPP for Windows (32 bit). Follower the installer, default options.


Then download the Microsoft Drivers 4.3 for PHP for SQL Server.  

Extract the contents of this download to your PHP extensions directory (probably 'c:/xampp/php/ext')


Open your PHP /ext directory and look for the file named php_pdo_sqlsrv_71_ts_x86.dll - ensure it's there.


Now open your php.ini file and scroll to the Windows Extensions section.  


Paste the following line at the bottom of the extensions;

extension=php_pdo_sqlsrv_71_ts_x86.dll


You can test if everything is working by either creating a phpinfo() page and viewing the contents, or open a command prompt, change directory to your PHP folder and run the following command;


php-cgi.exe -v


If all is working you should see the version information, similar to below;

c:\xampp\php>php-cgi.exe -v
PHP 7.1.9 (cgi-fcgi) (built: Aug 30 2017 18:37:33)
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies 

Any questions let me know :)

Rate this blog entry:
Ubuntu 14 Install and Configure SSH
Ubuntu Remotely Connect to MySQL Database

Comments

 
No comments yet