Geeklog on IIS

By Eric Woersching

December 18, 2007

Introduction

Geeklog is a PHP/MySQL based application for managing dynamic web content. It is a blog engine, or a CMS with support for comments, track backs, multiple syndication formats, spam protection, and all the other vital features of such a system. The core Geeklog distribution is easily extended by community-developed plugins, including forums and image galleries.

For more information about Geeklog, see http://www.geeklog.net.

In this article, we go through the steps that would be required to install Geeklog to work with FastCGI extension on IIS6.0. To find out more about FastCGI support in IIS, see http://www.iis.net/fastcgi

The following steps assume that you have completed the setup and configuration of FastCGI extension and PHP libraries as described in http://www.iis.net/fastcgi/phpon60.

Download and Unpack the Application

First, download the latest stable release of Geeklog. For this article, we use Geeklog 1.4.1 downloaded from here. Once you downloaded the package, uncompress it

Note: For this walkthrough, we extracted the files to D:\Geeklog.

Everything outside the public_html directory should not be visible over the web, as it contains sensitive information. Hence, copy the content of public_html out into a directory served by your web server

Note: For this walkthrough, we copied the content to directory D:\public_html and created a virtual directory called 'Geeklog' pointing to D:\public_html.

Set Up the Database

In order to use Geeklog, you must have access to a database. For this walkthrough, we use MS SQL Server 2005. You can also use MySQL or MS SQL Express.

Before starting the install, create a database on your server. Also create a database user and grant this user db ownership permission to the database. If you are using MS SQL Server 2005, then open Microsoft SQL Server Management Studio and click the "New Query" button. Enter the following script into the query window (this script creates the database and user that are necessary for the Geeklog application).

USE [master]
GO

CREATE DATABASE Geeklog
GO

CREATE LOGIN [Geeklog]
WITH PASSWORD=N'Geeklog',
DEFAULT_DATABASE=[Geeklog],
CHECK_EXPIRATION=OFF,
CHECK_POLICY=OFF
GO

USE [Geeklog]
GO


CREATE USER [Geeklog] FOR LOGIN [Geeklog] WITH DEFAULT_SCHEMA=[dbo]

Note: Make sure the login Geeklog has permission to create tables inside the Geeklog database.

Configure the Application

1. Start by making the following updates to config.php. The examples that follow are specific to this walkthrough.

Set $_CONF['path'] to point to the directory where your config.php file resides.

$_CONF['path'] = 'd:/geeklog/'; // should end in a slash

Set $_CONF['path_html'] to point to where the contents of public_html have been placed.

$_CONF['path_html'] = 'd:/public_html/';

Set Geeklog to use MSSQL and configure the Sql login credentials.

$_DB_dbms = 'mssql';     // 'mssql' (Microsoft SQL Server)
$_DB_host = 'localhost'; // Name of your database server
$_DB_name = 'Geeklog'; // Name of the database
$_DB_user = 'Geeklog'; // MSSQL user name
$_DB_pass = 'Geeklog'; // MSSQL password

Set $_CONF['site_url']

e.g. $_CONF['site_url']          = 'http://localhost/geeklog';

2. Edit lib-common.php and change the require_once() at the top to point to the location of your config.php file.

For more information on how to install Geeklog, refer to http://www.geeklog.net/docs/install.html.

3. Afterwards, open your web browser and browse to http://localhost/geeklog/admin/install/install.php.

4. Select the installation type from the drop down. For this walkthrough, we set up a new Microsoft SQL Server database. Set the path to config.php and click Next.

5. We are now ready to setup the database and complete the installation. Click Next.

Getting More Information

To discuss the FastCGI Extension for IIS 6.0, or file bug reports, please use the FastCGI forums:

To get more information regarding running various PHP applications on IIS refer to: