Talking The Talk (A phpBB Primer) - Building Blocks (
Page 3 of 9 )
In order to get started with phpBB, you'll need a working PHP installation
(I'm currently running PHP 4.2.3), a MySQL database server (I'm running MySQL
4.0.10) and a copy of the latest release (currently version 2.0.4) of the
package; you can download a copy from http://www.phpbb.com/downloads.php
Setting up the package is pretty simple. The first step is to uncompress the
source archive into a directory under your Web server (mine is called "medusa"
here) root.
$ cd /usr/local/apache/htdocs/
$ tar -xzvf /tmp/phpBB-2.0.4.tar.gz
This should create a directory (named "phpBB2/" for phpBB 2.0.4) which
contains the following files:
$ ls -l /usr/local/apache/htdocs/phpBB2
drwxrwxr-x 2 www www 4096
Jan 15 19:04 admin
-rw-rw-r-- 1 www www 5489 Jan 15 19:04
common.php
-rw-rw-r-- 1 www www 0 Jan 15 19:04 config.php
drwxrwxr-x 2 www
www 4096 Jan 15 19:04 contrib
drwxrwxr-x 2 www www 4096 Jan 15 19:04
db
drwxrwxr-x 2 www www 4096 Jan 15 19:04 docs
-rw-rw-r-- 1 www www 810
Jan 15 19:04 extension.inc
-rw-rw-r-- 1 www www 3596 Jan 15 19:04
faq.php
-rw-rw-r-- 1 www www 46523 Jan 15 19:04 groupcp.php
drwxrwxr-x 3
www www 4096 Jan 15 06:17 images
drwxrwxr-x 2 www www 4096 Jan 15 19:04
includes
-rw-rw-r-- 1 www www 14332 Jan 15 19:04 index.php
drwxrwxr-x 3
www www 4096 Jan 15 19:04 install
drwxrwxr-x 3 www www 4096 Jan 15 19:04
language
-rw-rw-r-- 1 www www 7097 Jan 15 19:04 login.php
-rw-rw-r-- 1 www
www 12059 Jan 15 19:04 memberlist.php
-rw-rw-r-- 1 www www 36338 Jan 15 19:04
modcp.php
-rw-rw-r-- 1 www www 34935 Jan 15 19:04 posting.php
-rw-rw-r-- 1
www www 73271 Jan 15 19:04 privmsg.php
-rw-rw-r-- 1 www www 3726 Jan 15 19:04
profile.php
-rw-rw-r-- 1 www www 40443 Jan 15 19:04 search.php
drwxrwxr-x
3 www www 4096 Jan 15 19:04 templates
-rw-rw-r-- 1 www www 23070 Jan 15 19:04
viewforum.php
-rw-rw-r-- 1 www www 7232 Jan 15 19:04
viewonline.php
-rw-rw-r-- 1 www www 45110 Jan 15 19:04
viewtopic.php
The next step is to create a database for your phpBB data. Start up the MySQL
command-line client, log into the database server, and create a database named
"phpbb".
$ mysql
mysql> CREATE DATABASE phpbb;
Query OK, 1 row affected (0.03
sec)
You can check that the database has been created,
mysql> SHOW DATABASES;
+------------+
| Database
|
+------------+
| mysql |
| phpbb |
| test |
+------------+
3
rows in set (0.08 sec)
and then log out.
All that's left now is to create the base tables for the application,
configure it to talk to the database, and set an administrator password. phpBB
makes all this easy to accomplish via a single-click PHP script, which performs
all these tasks for you automatically.
Make sure your Web server is running, and point your browser to the
"install/install.php" script of your phpBB installation. For example, if the
application was installed to the root of the Web server, you would surf to
"http://medusa/phpBB2/install/install.php", where you'd see something like
this:

This is the initial application configuration screen, which requires you to
enter basic information about your system - credentials for the MySQL database,
a username and password for the forum administrator, the Web server host name
and application location, a prefix for the phpBB database tables and an email
address for administrator notifications. Note that this application
configuration module allows you to perform both a new install and an upgrade of
an existing installation; you should obviously pick the former in this case.
Once you've entered all the required data, submit the form, and the
installation script will go to work creating the tables for you. On successful
completion, you should see a screen with the following message.

You can verify that the tables have indeed been created by going back to the
MySQL command line and checking for yourself.
mysql> USE phpbb;
Database changed
mysql> SHOW TABLES;
+------------------------+
| Tables_in_phpbb
|
+------------------------+
| phpbb_auth_access |
| phpbb_banlist
|
| phpbb_categories |
| phpbb_config |
| phpbb_disallow |
|
phpbb_forum_prune |
| phpbb_forums |
| phpbb_groups |
| phpbb_posts
|
| phpbb_posts_text |
| phpbb_privmsgs |
| phpbb_privmsgs_text |
|
phpbb_ranks |
| phpbb_search_results |
| phpbb_search_wordlist |
|
phpbb_search_wordmatch |
| phpbb_sessions |
| phpbb_smilies |
|
phpbb_themes |
| phpbb_themes_name |
| phpbb_topics |
|
phpbb_topics_watch |
| phpbb_user_group |
| phpbb_users |
|
phpbb_vote_desc |
| phpbb_vote_results |
| phpbb_vote_voters |
|
phpbb_words |
+------------------------+
28 rows in set (0.01
sec)
All there? Good. Before you get into actually configuring your forum for use,
there is one more thing you need to do - delete the "install/" and "contrib/"
directories from the main application directory.
$ rm -rf /usr/local/apache/htdocs/phpBB2/install
$ rm -rf /usr/local/apache/htdocs/phpBB2/contrib
Leaving these directories behind opens up a serious security hole in your
forum...so serious, in fact, that phpBB will refuse to function if they're
present, stubbornly displaying the following error until you delete them:

All done? Flip the page, and let's set some global parameters for the
application.