Before getting too ahead of myself, why use Horde? In short, if you like having access to your e-mail, contacts, calendar, to do, and more from anywhere in the world via web browser, then you'll want to try Horde and it's associated applications. The new Horde Groupware Edition (HGE) now makes it much easier than the old way to set up, especially as you no longer have to download and install all the separate applications. New setup scripts make configuring HGE easier than 2.x as well.
This guide assumes you have these minimum requirements already installed and working. If you need help installing or configuring these, you'll have to look elsewhere, sorry.
- IIS 6.0 on Windows 2003
- PHP 5.2.0 or above (latest 4.x should work) with added PECL extensions & PEAR installed
- MySQL 5.x (4.x should work, my server has 5.x)
- PHPMyAdmin
- A database dedicated to Horde
- A user with privileges to the above database
- An IMAP or POP3 mail server with SMTP support
- A text editor (like Crimson Editor or PSPad)
- A download of HGE
I'm also going to work with a few assumptions about your installation:
- You don't want to install to the default database (horde)
- You don't want to install the default database user (horde again)
- You don't want to install to the default directory
The first step is to make sure you have required PHP extensions installed. These include: dom_xml, gd, gettext, iconv, imap, ldap, mbstring, mcrypt, fileinfo, memcache, mime_magic, mysql, mysqli, openssl, session, xml, and zlib. To enabled these, open up your php.ini, and make sure lines like extensions=php_domxml.dll do not have a semi-colon in front of them. For most of you, this will simply mean you need to go to the Dynamic Extensions portion of the PHP.ini file and uncomment (remove the semi-colon from the start) the extensions listed above. Once this is done, you will need to restart IIS if it's running. NOTE: Some extensions come in the PECL add on available from php.net which you will need to download and extract into your ext directory. Note: if you don't have an LDAP server you can leave that out. If you don't have IMAP, you can leave that out. If you're using PHP 4.x or MySQL 4.x, you don't need MySQLi.
Another edit you may need to make if you're running PHP 5.x is to set zend.ze1_compatibility_mode = off. Horde will die with a fatal error if that directive is turned on.
The second step is to extract the HGE distribution to a folder of your choosing. Let's assume you have a site at http://www.mywebsite.com and would like to install webmail under that at http://www.mywebsite.com/webmail. You will need to create a folder webmail and extract the HGE distribution to there. When it's done, you should have a webmail folder with folders underneath such as imp, kronolith, config, and several others, and some files like index.php, login.php, and rpc.php inside.
Once you have the files extracted properly, you should be able to open a web browser and open your webmail directory. In this case, we're looking for http://www.mywebsite.com/webmail. However, we need to stick on test.php at the end (end result: http://www.mywebsite.com/webmail/test.php ). This will cause HGE to run some basic tests to make sure your system is compatible.
Because we want a customized installation, this takes some work with importing the SQL files. Open up PHPMyAdmin, and the scripts\mysql\create.mysql.sql file. In the create.mysql.sql file, scroll down to the first CREATE TABLE statement (should be "CREATE TABLE horde_users"). Select this line and everything after it (Ctrl-End while holding Shift), and then copy (Ctrl-C). This will prevent the script from creating a horde database and horde user. Now, switch over to your PHPMyAdmin session, select the database in the left side menu to bring up a view of it, and select the SQL tab. Paste (Ctrl-V) the code you copied earlier into the import box, then select Go. If successful, you should see tables added to your database. Note: If you're fine with a horde user and horde database, import the whole thing.
After importing the main set of tables, you need to import the other applications database files. Under the kronolith, mnemo, nag, and turba folders, look for the scripts directories, and import the appropriate MySQL file as above. The files you need to worry about are:
- Kronolith: kronolith.mysql.sql
- Mnemo: mnemo.sql
- Nag: nag.sql
- Turba: turba_objects.mysql.sql
Of course, if you don't plan on using one or more of these apps, don't waste time importing their database files.
More likely than not, this quick import method has inadvertently created a horde user regardless. Use PHPMyAdmin's privileges functionality to remove it unless you are using the horde db/user as noted above.
Next, you must set access rights for the IIS user so that it can change the configuration files from within Horde. To do so, right click the config folder, choose Properties, go to Security, and add your IIS_MACHINENAME user (where MACHINENAME is the name of your machine) by selecting Advanced -> Find Now. The rights you should have checked are Read & Execute, List Folder Contents, Read, and Write. Repeat this for each sub-application's config directory (Ingo, Kronolith, Mnemo, Nag, Turba).
While you're adding permissions, create a directory under the root of the Horde install for temporary files (we'll use /tmp) and set it writable by the IIS user.
Next, open up /config/registry.php. The first block of code you'll come to in this file talks about finding the webroot for Horde; in my experience, this doesn't work. Comment out this code block. It will look like this:
\*
if (isset($_SERVER['PHP_SELF'])) {
$webroot = preg_split(';/;', $_SERVER['PHP_SELF'], 2, PREG_SPLIT_NO_EMPTY);
$webroot = strstr(dirname(__FILE__), DIRECTORY_SEPARATOR . array_shift($webroot));
if ($webroot !== false) {
$webroot = preg_replace(array('/\\\\/', ';/config$;'), array('/', ''), $webroot);
} elseif ($webroot === false) {
$webroot = '';
} else {
$webroot = '/extras/plan';
}
} else {
$webroot = '/extras/plan';
}
*/
Now, you'll need to add the following after the */ on a new line:
$webroot = '/webmail';
Of course, if your install is in a different directory, you'll need to change this line appropriately. Don't add a trailing slash.
You should finally be ready to login to Horde, though configuration is far from over. Open up your horde site (in our example, http://www.mywebsite.com/webmail), and you should be presented with a setup screen. [1] From here on out, everything is web based and fairly self-explanatory.
After configuring Horde, you'll need to configure the sub-applications. This can be done by using the Administration link on the left side, then selecting Setup.
This should cover the nuts and bolts of getting HGE setup on your server. Configuration from here on out is largely going to depend on your particular network's details, such as what your mail server is, whether it's POP3 or IMAP, and so on. Once that's done, you now have your mail, contacts, and more available where ever you can get web access. Enjoy!
Just a note for those of you who want to go the extra mile and secure your installation with your own SSL setup, please see my previous guide.
[1] If this is not the case, you'll need to edit conf.php manually to add a mail server. HGE uses the mailserver info to provide login information.















