I\'m trying to connect to a Microsoft SQL Server 2008 R2 database using a PHP application in NetBeans 8.0.1. I have installed XAMP 1.8.2 and PHP 5.4.31 on Windows XP. The Ap
Problem solved... The first answer is to install the correct SQL Server drivers, which may force you to use an older version of PHP, XAMPP, and Apache Web Server...info can be found here;
For me it was necessary to install an older version of XAMPP, the most recent release for my system (WinXP, PHP 5.2.4) is XAMPP 1.6.4, which can be found here. Find the most compatible version of XAMPP for your system by checking out this article. Be sure you choose the most recent XAMPP release that is compatible with your version of PHP.
The next problem was the installation of SQL Server drivers. It turns out that the php configuration file(php.ini) can be found in two places in the XAMPP 1.6.4 installation directory. The first location is D:/xampp/php/php.ini, which is the file that the documentation and all forums suggest you modify in order to add the extensions...however, it was necessary to modify the php configuration file found in the Apache bin directory(D:/xamp/apache/bin/php.ini), from which XAMPP 1.6.4 is loading the php configuration file.
The topmost table of the phpInfo() page indicates the location of the loaded php configuration file. The table key is: Loaded Configuration File.