Composr Tutorial: Installation on a Windows server

Written by Chris Graham
This tutorial will show you how to get a Composr installation running on a Windows server, using IIS (maintenance status). It is written for readers with a higher expertise than the Installation on a Windows desktop tutorial is. If you want to see Composr installation steps, or information about Composr's own Web Platform Installer, see that tutorial.

If you are running a Windows desktop machine that you want to behave like a proper IIS server, this tutorial will cater for that too.


Remote desktop

This step does not apply if working from a webhosting control panel

You'll want to connect to and manage a remote server using Remote Desktop. Remote Desktop clients are available for all the main operating systems and Windows Server comes with a Remote Desktop server built in.

Pre-setup

This step does not apply if working from a webhosting control panel – and presumably this is already handled

If you are on a new server remember to install any system updates. This may actually be necessary to get some of your server software installed.

Microsoft Web Platform Installer

This step does not apply if working from a webhosting control panel – you likely have everything you need pre-installed anyway

The easiest way to install your server software is with the Microsoft Web Platform Installer. Follow the link and install it.

When Web Platform Installer installs PHP it will make sure file permissions to PHP are correct as well as automatically configuring FastCGI. These are quite hard to do manually.

You also need to install Microsoft .net 3.5 via "server roles", if it is not already installed. You can also try installing .net 3.5 manually if needed.

From the Web Platform Installer you need to install:
  • IIS Express if you are not running on a real Windows Server
  • IIS: CGI
  • (IIS) URL Rewrite
  • PHP
  • (PHP) Windows Cache Extension
  • SQL Server Express if you will be using SQL Server rather than MySQL and if you don't have a full SQL Server installation already
  • "Microsoft Drivers (…) for PHP (…) for SQL Server in IIS" if you will be using SQL Server rather than MySQL
  • MySQL Windows if you will be MySQL
Make sure you install things with consistent IIS/PHP versions, and the correct 32bit/64bit for what Windows is using, things are not always sorted well.
  • PHP Manager for IIS

Configuring PHP

This step either does not apply if working from a webhosting control panel, or would be handled in a different way by the particular control panel

From IIS Manager, go to the PHP Manager and enable the following PHP extensions:

Configuring IIS

This step either does not apply if working from a webhosting control panel, or would be handled in a different way by the particular control panel

You will want to turn off IIS's own error messages so that you can properly debug PHP/Composr. Go to the site node, the Error Pages icon, and Feature Settings (on the right), then enable Detailed Errors.

Configuring file permissions

Assign 'IUSR' 'Full control' permissions to your Composr base directory. If there's a 'IIS_IUSRS' user then give this user the same permissions. Permissions should recurse through (inherit), which is the default behaviour.

Caveat: If IIS is configured to use a different user then set permissions for that user. Sometimes webhosts configure IIS differently to the defaults, especially for shared hosting (they almost certainly should for shared hosting).

If you prefer atomic permissions you can use the fixperms.php script ( php fixperms.php) to do this, or you can also do it by hand. It will make things very awkward when managing addons so I don't recommend it!

Shared hosting

Things can get tricky on Windows shared hosting. Let's assume you have found what user your hosting is running under, you still need to set permissions. It's not clearly defined how to do this, but should be one of the following:
  1. Using Windows Explorer, using Remote Desktop. This is assuming you have Remote Desktop access.
  2. Using a webhosting control panel interface.
If you can't do either of these things, then my best advice is to find new hosting! You don't want to have to ask the webhost to do it for you every time you change something, that's going to be a PITA.

It's outside the scope of this tutorial to discuss how to ensure file permissions are secure on shared hosting, but we do touch on it in the Webhosting for Composr tutorial. Really this is up to the webhost to get right.

File extraction

This step does not apply if working from a webhosting control panel

You can download Composr's manual installer direct to the server, and extract it. For your situation this will be a little more intuitive and direct than using the quick installer.

Create databases

Create databases in MySQL / SQL Server. How to do this is outside the scope of this tutorial.

Composr Installation

Now proceed with installing Composr, via launching install.php in your web browser.

Shell scripts (advanced)

This step does not apply if working from a webhosting control panel

You may want to install git or Cygwin, so you can make use of some of the helper_scripts.

See also


Feedback

Please rate this tutorial:

Have a suggestion? Report an issue on the tracker.