We're about to roll out a couple of new Drupal sites. Prior to moving them to a production Web server, we moved them from a Windows XP server running a LAMP (XAMMP) to a machine runing IIS. We wanted to try an IIS development machine because our production server will run IIS 7 via Microsoft Web Server 2008. We do our development on Windows, using FastCGI and Zend Optimizer gives performance equal to Apache on Linux, and support for us is easier on the Windows platform.

Since others will be trying to install PHP with IIS 7 and maybe Vista, perhaps our experience will be helpful.

(1) FastCGI is part of IIS 7. Learn IIS has a great video for configuring FastCGI.


They have an HTML tutorial that's helpful, too.


(2) There is a new module available from Microsoft for implementing URL rewrite rules. You no longer need to download any third-party commercial ISAPI modules for IIS to get clean URLS in IIS 7.


We installed the module. Then, from the IIS Manager, we used the URL Rewrite Module option to add the rewrite rules. Yu can import rules from a .htaccess file or from a text file. We just clipped our rewrite rules to a .txt file and imported them.

(3) Getting phpMyAdmin to work with Vista for multiple sites was a time-consuming pain. I strongly recommend using Zend Core. It will install PHP, mySQL, and phpMyAdmin working. We have not been able to get phpMyAdmin to work from the Zend Core GUI for sites other than the default site. It works just fine if you call the index.php script for phpMyAdmin via a virtual directory, however.

(4) We got lots of warnings from the Drupal install.php script. This s because Zend sets the error_reporting string in php.ini to error_reporting = E_ALL. We changed it to error_reporting = E_ALL & ~E_NOTICE and that got us past the warnings. Don't worry, the warnings are there for developers. The installer will run fine, once you get past the warnings.

(5) The Database Configuration screen in the Drupal installer would return no error but would not advance to installing Drupal. We edited the $db_url = string in the settings.ini file, which is located in the sites/default folder for your Drupal installation.

A few words about the result:

(1) Clean URLs worked just fine with the imported rules. I was pleased that we did not need to add licenses for a commercial ISAPI filter just to get clean URLs.

(2) FastCGI offered excellent performance. Our initial tests indicate about 30x faster.

Our next step will be to add output caching. Rather than rely on Drupal's caching, the output caching in IIS 7 provides very granular control.




gmitchel850’s picture

BTW, these comments also apply to installing version 5.x of Drupal, too. We've tested both.

gmitchel850’s picture

Two other issues arose. Both are solved in the same way.

Status Report complained about GD not being present or being outdated. It also complained about MBSTRING, too.

The fix is to use the Zend Administrator to activate the two extensions. Zend loads a number of extensions but does not activate them. Once you activate them, you need to restart IIS from the IIS Manager.



gmitchel850’s picture

This little issue took several hours to figure out.

IIS 7.0 that ships with Windows Vista does not handle URI_REQUEST the way Apache does with FastCGI is enabled. Drupal (and apparently Joomla, Wordpress, etc.) expect the Apache behavior.

What this means, is that you can try saving administration configuration options *AND* they reset. It looks like mySQL queries are read-only. We tried and tried to alter the configuration for our site. We could alter the mySQL databases directly. No problem. Press "Save Configuration" from a Drupal administration page, however, and nothing changed.

Microsoft has issued a patch for IIS that provides the Apache behavior for URI_REQUEST. You can download it here:


With this patch in place, we were able to successfully migrate two sites from one development machine with XAMPP as a WAMP to another with IIS 7.0 under Vista Ultimate. We expect to migrate everything to the production server running Windows Web Server 2008 next week.

I am extremely pleased with the performance of Drupal under IIS 7.0 with FastCGI. It is faster than Apache.





GreenReaper’s picture

When using PHP 5.3 to connect to "localhost", the database script will time out when attempting to make a test connection to the database as documented at PHP's mysql_connect page.

This is because the mysql native driver now used by PHP cannot properly handle two addresses being returned for localhost.

To avoid this problem, either use, or comment out or remove the IPv6 entry for "::1 localhost" in your windows\system32\drivers\etc\hosts file (leave the other "localhost" setting).