This is something that a number of people I know have struggled with, so I hope to help out with what I have learned.
To connect your PHP program with MySQL is probably step two for any PHP developer and it’s very easy. In principle, connecting with SQL Server (Microsoft SQL) should also be easy, but when most people have their first go at a MSSQL connection, they just get the following:
SQLSTATE unable to connect:
sql server is unavailable or does not exist.
The thing is, PHP and it’s MySQL buddy are both free and they like each other, so if you install a new Apache server (or similar) its already set up to run MySQL connections without problem, but it’s not the same for MSSQL.
Here is a list of things you need to change in your setup to be able to open a MSSQL connection with PHP: