Saturday, March 04, 2006

First Problems

I've been looking around the code to try to find where to configure the database access (userid and password). Haven't found it yet, but I went ahead and tried to point my webbrowser to http://mydomain.com/horde/test.php and got some errors:
Warning: main(Log.php): failed to open stream: No such file or directory in /home/domain/public_html/horde/lib/Horde.php on line 3

Warning: main(): Failed opening 'Log.php' for inclusion (include_path='/home/domain/public_html/horde/lib:.:/usr/lib/php:/usr/local/lib/php') in /home/domain/public_html/horde/lib/Horde.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /home/domain/public_html/horde/lib/Horde.php:3) in /home/domain/public_html/horde/lib/Test.php on line 84

Warning: Cannot modify header information - headers already sent by (output started at /home/domain/public_html/horde/lib/Horde.php:3) in /home/domain/public_html/horde/lib/Test.php on line 85
Sure enough, the 3rd line of /lib/Horde.php is looking to include once 'Log.php', which I don't see anywhere in the install. But wait, there's more...

The output of test.php goes on to list various modules with either a Yes or a Warning message (I assume for optional compontents). Finally, in the PEAR section, I get:
  • Mail_Mime: No
    You do not have the Mail_Mime package installed on your system. See the INSTALL file for instructions on how to install the package. THIS IS A REQUIRED MODULE!
  • Log: No
    Make sure you are using a version of PEAR which includes the Log classes, or that you have installed the Log package seperately. See the INSTALL file for instructions on installing Log. THIS IS A REQUIRED MODULE!
So I guess I know why the Log.php isn't found. I'll have to look into it, but I think installing a PEAR module is gonna be a show stopper on a shared hosting web server.

Update: Could be a path problem in /config/mime_drivers.php

Configure horde to run and access the database

On the server, go to the horde/config directory, and remove the '.dist' extension from any files that have one. Also remove the hooks.php file, since I don't plan on doing any development.

Set up and configure an sql database

Horde comes with an sql script that creates the database and user and such, but it assumes you're running as the sql root user, so that won't work with my hosted server. I'll have to create the database and user with Cpanel and then try to use the rest of the sql script to create the tables.

My host uses Cpanel, which is relatively intuitive. I created a database called "horde", which get's my cpanel userid prepended to it, so it ends up getting called "userid_horde".

Then I created a database userid called "dbuser" and again it gets my cpanel userid prepended, so it's "userid_dbuser".

Then I add the user to the database with all priveleges.

Then I need to delete or comment out the database & userid creation parts of the sql script, leaving only the parts of the script that populate the database. The database and user creation parts are mostly at the beginning, so comment out everything down to the first line that starts with:
CREATE TABLE
in SQL, you comment out the lines by putting double dashes and then a space at the beginning of the line.

The rest of the script is a repetition of creating a table and granting priviliges to horde@localhost. Since this script will get run as a database user, and not as sql root user, comment out all the lines that start with:
GRANT SELECT
There's also a line near the end that needs to be commented out:
FLUSH PRIVILEGES;
That should leave just a bunch of the
CREATE TABLE
and
CREATE INDEX
lines

Then go back to Cpanel, and at the very bottom of the database section (where the databases were created) launch phpMyadmin. Select the userid_horde database(in the left column) and then the SQL tab (across the top). In the lower section, click the browse button, and choose the modified file, then click GO. There should be 8 tables in the database now.




Put the files on the server

I'm using Horde Horde 3.1-RC3 and IMP H3 (4.1-RC3)

First I FTPd them to the document root of the server.
Then I unzipped the Horde tar.gz file, and re-named the created directory form horde-3.1-rc3 to just horde.

Installing Horde & IMP on a hosted webserver

What is it?
Horde is an application framework written on php.
IMP is a usefull webmail interface based on Horde

Why?
My webhost runs it but uses a port that is blocked by my office firewall. I want to run it on port 80, like standard web programs.