D7 on IIS with MSSQL

Events happening in the community are now at Drupal community events on www.drupal.org.
kpastore's picture

Has anyone attempted a D7 installation on IIS using MSSQL yet? I have a client with very specific requirements, and was curious to find out others' experiences in this area.

Thanks!

Comments

I just finished setting up Drupal on MSSQL

fdavis47714's picture

I just finished setting up Drupal 7 on IIS and SQL Express on 2008 server. It all went pretty smoothly, with one issue.

The web.config that comes with Drupal 7 seems to be broken. I had to delete it before the site would run. I will have to manually set up the rewrite rules.

Thanks for the reply. Did

kpastore's picture

Thanks for the reply. Did you use WebMatrix (http://www.microsoft.com/web/webmatrix/) for this or a more traditional method. I know my way around a unix/linux server, but IIS and Microsoft don't seem to make much sense to me.

Thanks for any direction you can provide.

Traditional method

fdavis47714's picture

I've been wanting to experiment with WebMatrix, but haven't done so yet. As I understand it though, it might be able to give you a correctly-configured system right out of the box.

I have used IIS and SQL Server before but I'm far from being an expert. As far as configuring IIS goes, the PHP install did most of the work for me. When you download PHP for Windows, there are two sets of binaries available; one set that is compiled for Apache on Windows (labeled VC6), and a second set (labeled VC9) that is compiled using Visual Studio 2008 and intended for use with IIS.

Before installing PHP, go into your windows control panel to the Programs and Features section, and in Windows Features make sure that the optional IIS module for FastCGI support is installed, or PHP won't be able to configure IIS for you.

Once PHP is installed, IIS should automatically recognize files with the .php extension, and pass them to the php binaraies for execution.

Setting up a database for Drupal to use was pretty easy, since the GUI for SQL server (SQL Server Management Studio) makes it easy to poke around and find what you want; set up a database, then create a new user, and then grant that user access to the database.

From that point I followed the instructions found at http://drupal.org/project/sqlsrv . This project contains the Drupal database driver (not technically a module, since you need to put it into /includes/database), and also contains instructions for additional config steps, such as how to download and install the PDO driver for SQL Server from Microsoft.

Just let me know if you have any more questions.

One additional note

fdavis47714's picture

To enable clean URLs you will also need to download and install http://www.iis.net/download/URLRewrite , which is an IIS module that doesn't come bundled with IIS. Drupal 7 comes with a file called web.config, which does for IIS the same thing that .htaccess does for Apache. This web.config file contains all the rewrite rules you need to enable clean URLs. You should install this module before putting the Drupal files into your web site, or IIS will say that the web.config is invalid.

D7's web.config

MrPhilbert's picture

The web.config file that comes with D7 includes a 404 handler. This conflicts with D7's ability to tailor 404's on the Site Information page. You can see that having Drupal and your web.config try to do the same thing can cause a big ugly error page.

I remove this section (if I use the included web.config) from lines 29 through 32.

Then just create a page for those redirects and give it a path like "nopage" or something similar and title it with something like "The page you are looking for is not here". Now you can include content like:

"Please check the url you were typing (or the thickness of your fingers). If you got here via link from an external web site, we would appreciate getting that corrected. In the mean time, please have a look around. We're sure you'll find something of interest.

Thanks bunches and bunches"

Thanks for the information.

kpastore's picture

Thanks for the information. I'll be discussing the installation later today with the client, and this will be very helpful!

Indiana

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week