Installing phpBB 2.0.1 on Mac OS X Server
7 August 2002—Updated 24 September 2002
![]() |
phpBBWe tested a fresh installation of phpBB with Mac OS X 10.2 (with the latest Developer Tools and BSD SDK) on 22 September 2002 and found no problems installing or running the software. Note, however, that there are problems with the MySQL Manager application that Apple ships with Mac OS X 10.2 Server. We recommend manually starting and stopping MySQL using MySQL Manager. |
If you’re like many Web site managers, you’d like to add a little computer-mediated community to your site and bring in some additional eyeballs (and cash!). A number of community software packages are available that cost anywhere from USD 80.00 on up. It isn’t necessary to pay for good community software, however; there are free packages, and in this article we’ll install and configure one of the best: phpBB.
Before we begin
In order to use phpBB, you’ll need access to MySQL to create and manage the backend databases. Mac OS X Server comes with MySQL, but it’s not configured for use. Before you proceed with this article, you will need to setup MySQL; instructions can be found in Darian Lewis' MySQL article here on AFP548.com, or through other sources. My favorite source for an easy-to-install, up-to-date version is Marc Liyange’s excellent Web site.
If you aren’t a SQL wizard (and I’m not), you may want to investigate other means of controlling MySQL than via the command line. One such tool is phpMyAdmin, which gives you a Web interface using PHP. Another solution, which happens to encompass other system administration tools, is Webmin. I happen to use Webmin, so that’s the tool that will be referenced in this article. Other tools exist and can be found by searching on “MySQL” on popular Mac OS X software archive sites like MacUpdate and VersionTracker.
Grab the software
phpBB is distributed as a compressed UNIX source archive. If this is your first installation, create a directory into which you will receive the software. You can do this using the Finder or the Terminal, whichever suits you best. Once you have created it, retrieve the software archive from SourceForge:
curl -O http://telia.dl.sourceforge.net/sourceforge/phpbb/phpBB-2.0.1.tar.gz
Note: SourceForge has many mirrors for downloading software. If you are not on the East Coast of the US, please select a different mirror by going to http://prdownloads.sourceforge.net/phpbb/phpBB-2.0.1.tar.gz to find the proper URL for the actual source download.
Once you have the archive, decide where in your Web site tree you want it to be installed. If you don’t run any virtual hosts, you can place it under /Library/WebServer/Documents. Copy the archive to that location and decompress it:
gnutar zxvf phpBB-2.0.1.tar.gz
You can change the name of the decompressed directory (phpBB2) to whatever you would like it to be in its eventual URL. The files in this new directory need to be manipulable by the Web server, so use the command
chown -R www:www directory-name
(changing directory-name to the name you gave phpBB) to give the files to the server.
Enable PHP
If you haven’t already done so, you will need to enable PHP support in Apache. To do this, you will need to be at the command line. Launch Terminal and bring the file /etc/httpd/httpd.conf up in your favourite editor, as super-user. For example:
sudo emacs /etc/httpd/httpd.conf
Find the line “#LoadModule php4_module /usr/libexec/httpd/libphp4.so” and uncomment it by removing the initial octothorpe. If your httpd.conf file does not have a line like this, you may not have PHP at all and will need to install it. I recommend visiting Marc Liyange’s PHP site for the latest package and easiest installation.
Next, remove the leading octothorpe from the line “#AddModule mod_php4.c,” to uncomment it.
Find the lines
#AddType application/x-httpd-php .php #AddType application/x-httpd-php-source .phps
and remove their leading octothorpes. Finally, append “ index.php” to the end of the DirectoryIndex directive. Restart Apache using the “sudo apachectl restart” command. If you run multiple Web sites, you will need to add “index.php” to the site under which you’ll be installing phpBB; the easiest way to do this is by using Server Admin to modify the setting.
Change to your /Library/WebServer/Documents directory, and create a new file called “info.php"—its contents will be the following lines:
<?php phpinfo(); ?>
Save the file and open a Web browser to the URL: http://localhost/info.php and you should see something like the following:

If you don’t see this, check to make sure you have PHP installed: look for /usr/libexec/libphp4.so, make sure you have made the changes from above to httpd.conf, and make sure you restarted Apache.
Install phpBB
Before running the installation script, you need to create a database for phpBB. We’ll create one using Webmin and MySQL; phpBB supports other databases, but MySQL is free and powerful. To start, bring up Webmin and click the Servers icon.
Click on the MySQL button to switch to the MySQL module. An example screen is shown below.
Click on the “Create a new database” link. Fill out the Database name, as shown below, and click the Create button. The phpBB installation program will add in the tables and fields.

Once you’ve created the database, you will need to create a database user who will be associated with the new database. To do that, return to the MySQL module and click the “User permissions” icon. You will see a table similar to the one excerpted below. Click on the “Create a new user” link, and fill out the details as shown in the second screen capture, below. Be sure to set “Hosts” to localhost. Their user permissions should include all table data options, as well as table creation and deletion, at minimum.


After you have saved the new user, return to the main MySQL module page and click on the “Database Permissions” icon. You will be presented with a table of databases and their permissions, similar to what is shown in the screen shot below. Click on the “Create new database permissions” link.

On the page that appears, similar to the one shown below, you can either select the database from the drop-down list, or type it in (as we have in the screen shot). Make sure to tie the database to the user you created earlier, and set their Hosts permission to localhost once agan. Select all permissions, click the Save button, and log out of Webmin.

At long last—you’re ready to actually run the installer! To do that, point a Web browser at the location where you uncompressed phpBB. For example, if you uncompressed it within /Library/WebServer/Documents/phpbb, the URL would be http://localhost/phpbb. You should see a page similar to the screen shot below.
Fill in the fields with the appropriate values. “Database Server Hostname” should be set to “localhost,” since you’re configuring the database server on the same machine as where you have installed phpBB. When you have filled the fields in, click the “Start Install” button. After a moment or two, you will see the “Your admin username has been created. At this point your basic installation is complete” page, indicating that you’re ready to proceed to configuring the community software. If you see a page telling you that you will need to download your config file, you need to make sure that the directory into which you decompressed phpBB is owned by user and group “www". You will need to drop and recreate the database (using Webmin), then return to the installation page and re-enter your values.
Configure phpBB
At this point, you’re brought into your new phpBB community. There are many configuration options and settings; most are straightforward, and those that aren’t are discussed at great length on the phpBB community support board. Enjoy your new community!


