Things look quiet here. But I've been doing a lot of blogging at
dan.langille.org because I prefer WordPress now.
Not all my posts there are FreeBSD related.
I am in the midst of migrating The FreeBSD Diary over to WordPress
(and you can read about that here).
Once the migration is completed, I'll move the FreeBSD posts into the
new FreeBSD Diary website.
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:
$ fetch http://phorum.org/downloads/phorum-3.4.3a.tar.gz
Receiving phorum-3.4.3a.tar.gz (167667 bytes): 100%
167667 bytes transferred in 1.6 seconds (100.84 kBps)
$ tar xfz phorum-3.4.3a.tar.gz
This created a phorum-3.4.3a directory which I renamed and moved into my
mv -i phorum-3.4.3a /path/to/my/website/phorum
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:
You didn't setup your database. Go to the admin (default admin/index.php) and complete the installation.
Click on the link to go to the Phorum Installation, which looks like this:
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:
$ ls -ld admin/settings
drwxr-xr-x 3 dan dan 512 Jun 27 08:54 admin/settings
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.
A quick check verifies that Phorum will now be able to create new files in this directory:
$ ls -ld admin/settings
drwxrwxr-x 3 dan www 512 Jun 27 08:54 phorum/admin/settings
And similarly, Phorum will be able to modify the file:
$ ls -l admin/settings/forums.php
-rw-rw-r-- 1 dan www 1987 Jun 17 07:19 phorum/admin/settings/forums.php
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 MySQL. If you are configuring the new PostgreSQL installation,
you should select PostgreSQL 6.5 or newer. Then click on Next Step.
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
Server Name. But here is what I did supply:
Database - Name:phorum_conversion
Database - User Name:dan
Database - Password:password
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
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
By clicking on the "Click here" link, you will be taken to the main administration page. If you
should be taken back to the Step 1 of the installation, press reload on your browser and you should
see the 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 New Forum from the Forum Maintenance.
Name: FreeBSD Support
Description: Ask for help here
Table Name: support
Then I clicked on Add.
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 m-d-y. Naturally, that's unnatural.
But you can change it to something better. The file you want is
lang/english.php. Look for the date_format function
down around line 170 or so. The code contains references to the PHP documentation so you can
design your own date format if you don't like mine.
The date format I use is:
$sDate = date("d-m-y H:i",$tstamp);
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 phorum.css. The part I modified is:
You can change the look and feel of Phorum by modifying include/footer.php
Just create a page which looks just like you want it, then split it at the point where you want Phorum
to appear. Then put the top stuff in header.php and the bottom stuff in
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.
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.