The FreeBSD Diary |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
Phorum Installation
25 August 2003
|
Phorum and PostgreSQL are two tools which I have used for several years and which I recommend to others. If you're looking for a message board or a database, these are what I think you should get. In this article I'll talk about installing and configuring Phorum. I'll provide detailed step-by-step instructions. They will work for both a new install and an upgrade. |
The agenda for today....
|
Today we will do the following:
And if that's not enough for you, we'll also do some of this:
|
Backup your data
|
I suggest taking your Phorum offline via its administration interface. This will prevent any updates by your Phorum users. The first step should be a backup of your Phorum data. My original MySQL article has some rudimentary backup steps. As does my PostgreSQL article. |
Create the PostgreSQL database
|
Phorum stores data in a database. You need to first create that database. This article will not concentrate on the PostgreSQL details as I'm going to assume you have previous experience. This previous article might help. Now we'll create the database:
Note that you can also use MySQL. |
Download and Install Phorum
|
Phorum can be downloaded from the main home page or from their download page. I'm running FreeBSD so I grabbed http://phorum.org/downloads/phorum-3.4.3a.tar.gz.
This created a
Take care to not overwrite any existing data Now we should be able to access Phorum from our website and that is how we will do the configuration. |
Configuration - language selection
|
Phorum is configured via a web-based interface. It is quite straight forward. If your website is http://www.example.org/, and you put the phorum directory in the root directory of this website, you should point your browser at http://www.example.org/phorum/. If everything has been set up correctly, you should see this message in your browser:
Click on the link to go to the
I selected English and clicked on Next Step. This is when I encountered my first problem. It was a permission issue. Here is what Phorum had to say about it:
This problem is caused by permission on the settings directory. Here are the default permissions:
Phorum needs to be able to create new files within that directory and modify any files which are
already there. Phorum will be running as the user www because that is what
Apache will be running as. This is the default setting for the FreeBSD Apache ports for some time.
Check your installation for details or ask your system admin.
I modified the permissions with this command:
A quick check verifies that Phorum will now be able to create new files in this directory:
And similarly, Phorum will be able to modify the file:
Now I'll click back on my browser and go to the previous page and then click on Next Step again. This time, things are as they should be, as demonstrated by the picture in the next section. |
Configuration - database type
|
If you are upgrading your MySQL installation, you should
select |
Configuration - database initialization
|
What you supply in the above page depends on what you are doing. If you are upgrading the MySQL installation, you should supply the MySQL database details and be sure to click on "Check here is this is an upgrade". If you are configuring the PostgreSQL installation, you should supply the PostgreSQL details.
My database server and my webserver are on the same machine. There was no need to supply a
This is not necessarily the best and most secure setup, especially for a production or shared server. I was doing this on my development box, on which I am the only user. I will eventually dump the data and upload that to my production server. After entering the above values, I click on Next Step. |
Configuration - Admin user
|
If you are creating a new installation, the following picture demonstrates what you should see:
Click on help for more information about this user. I supplied the details and click on Next Step. In the following picture, you can see that the Phorum upgrade process has altered various tables and updated a field in each forum table. This applies only if you are upgrading an existing Phorum installation.
|
Configuration - Phorum URL + Admin details
|
If you are creating a new installation, this picture demonstrates what you should see. The results will differ if you are upgrading an existing installation and the user you specified in the previous step already existed.
The URL supplied for me was correct. You can change it later if you want to. I filled in my email address and the name I wanted to use within Phorum. Then I clicked on Next Step. |
Configuration - done
|
|
Administration Interface
|
So far we have managed to install Phorum, create the database, and configure it for our needs. Next, we will create the forums within Phorum. |
Create our [PostgreSQL] forums
|
New forums can be created using the Phorum Admin pages (at /phorum/admin/index.php of your installation).
Select
I clicked on Main Menu and repeated the process for the other forums. |
Don't like the date format? Change it!
|
Out of the box, the Phorum date format is The date format I use is:
|
Don't like the text alignment? Change it!
|
When an author name gets long, it will wrap, which leaves the text on the line centered within the row. I prefer to have it top aligned. So I changed it.
The file I modified is
I added this line to the above declaration:
|
Customize the look
|
You can change the look and feel of Phorum by modifying For more information, please try my Phorum first article. |
Fixing some HTML nits
|
I've taken a liking to having correct HTML. As a result of this liking, I've started validating my own pages with that link at the bottom of the page. It's allowed me to find many errors, which browsers seem to cope with regardless. Why validate? If I know my code is valid, then it should render the same, without error, on any browser. Well, any browser which follows the standards. I've made my changes available to the Phorum community. You can use them too if you want. |
And wouldn't you know it!
|
On the same day I finished writing the above, Phorum 3.4.4 came out. DOH! Not to worry. The above process will work for that version too. |
Go Phorum!
|
Phorum is a very good and solid product. It runs great on both MySQL and PostgreSQL. I like it much better than any other forum software I've seen. I recommend it. |