How To Configure IIS And MS SQL Server 2008 R2 With PHP

  • Post published:July 10, 2015

Agile development teams have to accept sudden changes in requirements from their clients. Sometimes because of only this reason, teams have to revamp the entire developed project which is at the edge of completion i.e. its deployment on live server. Recently in a project, a similar situation occurred with vteam #385. The sudden requirement was to configure IIS and MS SQL Server 2008 R2 with PHP in a letters and emails merge web application.

Application Overview:

The application had two versions. The second version of the application needed to be integrated with another web application which was developed in ASP.NET. Their registration and login were synced with one another. This process is done under the hood. This version allowed leveraging MS SQL Server 2008 R2 Database and contained files that help users to produce multiple letters in just few minutes. A calendar was integrated that helps its users to achieve  letter producing goals. Its support also assisted users with questions, answers and technical support.


Initially, the requirement was that its first version should use Open Source tools and technologies as used in its second version because both are synced with users registration process. To meet this requirement, vteam #385 used MySQL database and deployed it on Apache. Once the deployment was almost at its end with all the development and testing on staging server, Client requested us to use MS SQL Server 2008 R2 database and the project should be deployed on IIS. Our team was given just a few days to accomplish this new requirement.


The main challenge faced by our team was that the project was deployed. Testing of everything was done on MySQL and Apache. But now as the requirement changed, team had to get the project run on IIS by using Microsoft SQL Server 2008 R2 and make it live for end users in just a few days.

How Did We Achieve This?

Our team had to do some R&D to learn IIS and MS SQL Server 2008 R2 and its configuration with PHP. After R&D, the following steps were implemented:

  • Installed PHP on IIS
  • Configured MS SQL Server 2008 R2
  • Installed Microsoft Drivers for MS SQL Server and PHP DLLs:
    Microsoft SQL Server Native Client
  • Configured FastCGI for IIS
  • Integrated URL Rewrite modules for IIS
  • Migrated Database from MySQL to MS SQL Server 2008 R2 by using Microsoft SQL Server Migration Assistant version 5.3
  • Used the following two Data Types in the replacement of ‘ENUM’ and ‘TINYTEXT’ because they were not supported by MS SQL Server 2008 R2:
    status VARCHAR(10) NOT NULL CHECK (status IN(‘pending’, ‘mailed’, ‘created’))


After R&D and implementing the above mentioned steps, our team was able to configure the project successfully on IIS and integrated MS SQL Server 2008 R2 within the given time limit.