KnowledgeTree 3.5.* on Microsoft IIS

From KnowledgeTree Document Management Made Simple

Jump to: navigation, search

Please note that this is not a supported environment for KnowledgeTree

KnowledgeTree typically runs within Apache on Windows environments. These instructions detail getting KnowledgeTree running within a FastCGI and ISAPI-based PHP implementation on Windows. We've cheated somewhat by utilizing the stack-based Windows installer to install the MySQL, OpenOffice and Lucene implementations. You may want to do this manually by following KnowledgeTree_3.5.*_-_Performing_a_Source_Only_Install.

This is a very quick install and there are far more elegant ways of going about it.

What you will need:

Note: these instructions have only been tested using IIS 5.1 on Windows XP. Vista and 2008 Server may require additional steps to setup security. Google is your friend here.

Contents

FastCGI versus ISAPI

Microsoft IIS supports both ISAPI and CGI. CGI on Windows has performance issues as it is entirely process-bound and per-request process start-up is expensive on Windows. ISAPI runs within the IIS process pool and utilizes a threading model. ISAPI's threading model requires that all of PHP's modules are thread-safe, which isn't always the case.

Enter FastCGI. FastCGI attempts to reduce the overhead of per-request process startup by keeping some elements of the PHP process in-memory. As FastCGI utilizes a process model it doesn't have thread-safe issues.

More information on FastCGI (and a download) on Microsoft's IIS website:

http://www.iis.net/default.aspx?tabid=1000051

Note that at time of writing, FastCGI is not yet out of Beta.

ISAPI is currently the fastest method of running KnowledgeTree on Windows. We have however not determined whether all required modules are thread-safe - run at your own peril.


Step 1: Install KnowledgeTree Open Source from the Standard Stack

Install KnowledgeTree from the standard stack and ensure that it is running correctly by logging in at:

http://localhost:8080/

Step 2: Install FastCGI (optional)

If you want to utilize FastCGI, follow Microsoft's instructions on installing FastCGI. Leave setting up the PHP bindings within IIS to the PHP installer below.

Step 3: Install PHP

Run the PHP Windows installer and select either ISAPI or FastCGI (see Step 2 above). The PHP installer should do all the IIS PHP binding for you.

Step 4: Copy KnowledgeTree To The Inetpub

Copy the KnowledgeTree PHP application in c:\Program Files\ktdms\knowledgeTree to c:\Inetpub\wwwroot folder. Set the KnowledgeTree config.ini paths appropriately.

If you were to be doing this in a production environment (which you're not as this is not supported), you would do something clever around setting up a new IIS Website.


Step 5: Copy the PHP modules and modify the PHP.ini accordingly

The standard PHP from Zend doesn't ship with many modules.

Copy the c:\Program Files\ktdms\php\ext folder to c:\Program Files\php\ext (or where ever else you installed PHP).

You really shouldn't do this in real life as the modules are version dependent. It would be best to ensure that version of PHP you were using matched the modules.

Add the list of modules in the KnowledgeTree stack's PHP.ini to the new PHP.ini you have installed.

The lines look as follows: extension=...

Step 6: Check that it all works OK

Run the pre and post-install scripts to ensure that KnowledgeTree is installed properly. Fix any permission or other errors that are noted.

If post-install complains about database access ensure that the mysql module is enabled in your php.ini.

Do also check that the MySQL, Lucene and Scheduler services are running.


Step 7: Try out KnowledgeTree

Run KnowledgeTree by heading over to your webserver and entering the address to the KnowledgeTree application (something like http://localhost/knowledgeTree)

Personal tools