Installing Vermis on Microsoft IIS Web Server on Windows 7

1. Turn on IIS web server

Go to the Control Panel > Programs > Turn Windows features on or off

Select: Next open your browser and check if you have the IIS default page when you hit http://localhost
If you're using Skype remember to turn it off because it uses port 80 which is needed by IIS.

2. Install PHP

Get the PHP for Windows from http://windows.php.net/download/
Download version 5.2.x or higher (i.e. 5.3.x). I have downloaded this zip package: http://windows.php.net/downloads/releases/php-5.3.3-Win32-VC9-x86.zip
Unpack it to C:\php, next copy php.ini-development to C:\php\php.ini and make sure that you have following lines (or simmilar) in [PHP] section:

[PHP]
fastcgi.impersonate = 1
cgi.fix_pathinfo = 0
cgi.force_redirect = 0
open_basedir = "C:\Windows\TEMP\;C:/inetpub/wwwroot/"
extension_dir = "C:/php/ext/"
error_log = "C:/php_error.log"
short_open_tag = On

[Session]
session.save_path = "C:\Windows\TEMP\"
Next go to Control Panel > System and Security > Administrative Tools and click IIS Manager.

Open „Handler Mappings” and click on „Add Module Mapping...”
Create a new module mapping for php by filling form in popup window:

Request path: *.php Module: FastCgiModule Executable: C:\php\php-cgi.exe Name: FastCGI

Restart IIS server and go to the C:\inetpub\wwwroot
Next create a new file called phpinfo.php and put following content inside:

    <?php phpinfo();
Open your browser and go to this location http://localhost/phpinfo.php and check out if you have a PHP information page.

3. Install ISAPI_Rewrite3

Download the latest lite version of ISAPI_Rewrite3 from this site: http://www.helicontech.com/isapi_rewrite/
And install it.

4. Install MySQL

Download the latest MySQL server and install it http://dev.mysql.com/downloads/mysql/

5. Install Vermis

Get the latest Vermis package from http://vermis.hellworx.com/download
Unpack it into C:\inetpub\wwwroot\vermis

Next create a new database called vermis.
You can do this by typing mysql query:

CREATE DATABASE vermis;
and next create user vermis identified by password vermis which has access to the vermis database.

GRANT ALL PRIVILEGES ON vermis.* to vermis@localhost identified by 'vermis';
Next you need to load database structure from database.sql file into your new vermis database.

Next go to C:\inetpub\wwwroot\vermis\config and copy sample.config.php to config.php
Open it and edit:

<?php

return array(

    'environment' => 'prod',

    'prod' => array(
        'baseHost'                  => 'http://localhost',
        'baseUri'                   => '/',
        'locale'                    => 'en_US',
        'uploadMaxSize'             => 1048576, // 1MB
        'dateFormat'                => 'Y-m-d H:i:s',

        'mailer' => array(
            'enable'        => false,
            'from'          => 'no-reply@your-domain.tld',
            'titleHeader'   => 'Vermis'
        ),

        'database' => array(
            'driver'    => 'mysql',
            'host'      => 'localhost',
            'name'      => 'vermis',
            'user'      => 'myuser',
            'password'  => 'mypassword',
            'port'      => 3306,
            'debug'     => false
        ),
        
        'throwExceptions'   => true
    ) 

);

6. Adjust IIS settings for Vermis

Go to Control Panel > System and Security > Administrative Tools and click IIS Manager
On the left side you should have : Sites > Default Web Site click it and edit by hiting „Basic Settings...” from a menu in the right column of the manager.

Physical path: C:\inetput\wwwroot\vermis

Restart your server and check if you see this page: http://localhost/index.php

7. Adjut ISAPI_Rewrite3 for Vermis (rewriting)

Go to your ISAPI_Rewrite3 installation directory (C:\Program Files\Helicon\ISAPI_Rewrite3)
Edit httpd.ini and copy there this content:

[ISAPI_Rewrite]

RewriteEngine On
RewriteBase /
RepeatLimit 20
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|ico|gif|jpg|jpeg|png|css|htm|html|htc)$ index.php
Restart your IIS server!

8. DONE!

Go to http://localhost/ if you see Vermis then it works :)

9. Possible problems

The biggest problem that I had on Windows7 was to force it to unset the „ReadOnly” attribute from wwwroot directory, because Vermis needs a permission to write in these directories.
If you have the same problem you can find some help here:
http://itexpertvoice.com/home/fixing-the-windows-7-read-only-folder-blues/
Copyright © 2011 HellWorx Software