Installation

Now that all the prerequisites have been met, let's start the installation process:

  1. Download: Download the compressed phpBB files from http://www.phpbb.com/downloads.php selecting a compression format that you know how to decompress.
  2. Decompress: Unzip the files to a selected directory, using your preferred compression utility (WinZip for example). If you're installing locally, unzip to a directory within your web root. The top-level directory of the phpBB directory tree will be called phpBB2.
  3. FTP: If you're installing locally, skip this step. If you're installing on a remote server, copy the whole phpBB2 directory as-is to the remote server. You can do this easily using an FTP program to connect to your server and transfer the files.
  4. Select your phpBB root. This step is when you need to make an important decision—where on your server you are installing phpBB and how you are naming it. The reason why this is important is because this will determine how your users will see your board. Let's say your domain is http://www.yourdomain.com. You have the following options:
    • If you copy the phpBB2 directory and its contents to your web root and install without any modifications, your forums will be available at http://www.yourdomain.com/phpBB2.
    • You can simply rename the phpBB2 directory to something you like, say forum. In this case, your community will be located at http://www.yourdomain.com/forum.
    • You have the option of hosting the board in your web root so that it's accessible directly at http://www.yourdomain.com/ or, if you use a sub-domain, something like http://forum.yourdomain.com/. If you decide to go this way, than you need to copy the contents of the phpBB2 directory in your (sub)domain's web root, which is not the phpBB2 directory itself, but the files and directories that are contained within it.

    For the purposes of this chapter, we'll go with the second option,http://www.yourdomain.com/forum, as it is probably the most common one.

  5. config.php: You need to change the permissions for this file so that it's writable by phpBB during the installation. Go to the main directory where phpBB is installed and find the file called config.php. Change the file permissions so that it's writable by the phpBB installer scripts, or in other words, on Linux systems, chmod it to 666 (or -rw-rw-rw-). On Linux/Unix systems, chmod is a command that means "change mode", and is used to adjust file permissions. File permissions specify who can do what to a particular file. Your options to change a file's mode include:
    • If you have shell access to your Linux server, go to your phpBB directory and type chmod 666 config.php. This will do.
    • If you have FTP-only access, chances are your FTP client (the program you use for copying files to the remote server) will give you the option of chmod-ing, only you have to find it. In some FTP clients, this option is simply called chmod, in others it's under file properties or permissions.
    • If you cannot change the file permissions, don't worry. If the phpBB installer cannot write this file during the installation, you'll be given the option of downloading the config.php file on your system and then FTP-ing the file, overwriting the one already in the phpBB root.
  6. Start the phpBB installer: Point your browser to the phpBB directory, which in our case is http://www.yourdomain.com/forum/. You'll be redirected automatically to the installation script, which is located at http://www.yourdomain.com/forum/install/install.php.

    You should see a screen like the one that follows.

    Installation
  7. Installer data form: Complete the form that is presented on the installation screen. That's where your checklist from the previous section comes in handy. A description of the fields in this form follows, as some might not be so self-explanatory. In brief, most of the fields in this form are pre-filled by the phpBB installer; the ones you need to worry about are basically just the fields related to database name, username, password, and the administrator username, password, and email address.

    Option

    Setting

    Default board language

    Since you haven't installed additional languages yet, English is the only option. Later on if you decide to use other languages, you can always change this setting.

    Database Type

    The database system you'll be using, most likely MySQL 4.x or MySQL 3.x

    Choose your installation method

    Install or Upgrade. Go with Install, since you have no previous phpBB installation.

    Database Server Hostname / DSN

    Usually localhost; refer to your checklist.

    Your Database Name

    Refer to your checklist.

    Database Username

    Refer to your checklist.

    Database Password

    Refer to your checklist again.

    Prefix for tables in database

    phpbb_ is the default value. After the installation, all tables in the database to do with phpBB will have this prefix in their name, such as phpbb_users, and phpbb_posts. It's not compulsory to use a prefix, but it's a nice way to tell your phpBB tables from all the rest, in case you have other non-phpBB tables in the same database. This also allows you, for example, to have two or more distinct phpBB installations that share the same database; you just need to use a different prefix for each installation. Don't use spaces in this prefix, otherwise the installer will return an error. It's a good idea to leave the default phpbb_ value for the prefix, if you don't have a reason to change it. Most of the phpBB modifications that you may want to install later on will assume this prefix.

    Admin Email Address

    Your email address. It will be used, for example, as a sender email address when phpBB notifies a user about a new private message. So a good idea is to supply a working email address that you check often. An email that represents your board, like, would be a good choice.

    Domain Name

    Your domain's name. The phpBB installation will probably figure it out, otherwise type it in yourself.

    Server Port

    The default is 80. Normally you don't need to change this value.

    Script path

    The relative path to your installation. Normally the phpBB installer will guess it properly and you wouldn't have to change it.

    Administrator Username

    The administrator username is an important one. There is no default, but using Administrator is a common choice.

    Administrator Password

    Choose it wisely and make it difficult to guess. This option cannot be left blank.

  8. Finish installation: Click the Install button. If everything so far was fine, you've filled out all the required data in the install form, and there were no error messages, phpBB will install successfully. Click Finish installation and move on to the post-installation tasks.

Troubleshooting the Installation

This troubleshooting guide is not a comprehensive list; it just contains some common problems that phpBB users have. If your problem is not listed here, see the last section of this chapter for guidelines on how to look for help.

Symptom

Error message: Your config file is un-writeable at present.

Reason

For some reason, step 5 of the install steps listed above was not completed. Read the description of step 5 again, but only if you need more background information on the nature of the error. Otherwise just see the solution that follows.

Solution

The phpBB installer itself will recover from this situation. Just follow the instructions on the screen.

You are given the option of downloading the config.php file the installer tried to write. Download the file, and then copy/FTP it, overwriting the config.php file that is already in the phpBB root directory.

Alternatively, you are also given the option of using the installer to FTP the file for you, provided that your version of PHP supports FTP-ing (most likely). If you want to use this option, you'll have to enter the data you normally use to connect to the server with your desktop FTP client (CuteFTP, SmartFTP, etc.). Be sure to enter the full path to where the phpBB installer can copy the config.php file. The full path is the same as that visible in your FTP client. In other words, the phpBB installer is trying to act as an FTP client for you.

Symptom

Error message: Could not connect to the database.

Reason

There can be several reasons for this message:

  • You don't have a database system installed.
  • The database system is installed, but it's not running.
  • You didn't select the correct database type from the dropdown described in step 7.
  • The database hostname/DSN is incorrect.
  • The database name you provided refers to a non-existing database.
  • Your username to access the database is incorrect or this database user has insufficient privileges.
  • Your password to access the database is incorrect.

Solution

Read the pre-installation section again. Be sure to complete the checklist at the end with the correct data. If you're still having problems, consult the last section at the end of this chapter for an idea where you can look for help.

Symptom

Error message: The passwords you entered did not match.

Reason

This refers to the administrator password and the password confirmation you've entered at the very end of the installer form, under Admin configuration.

Solution

Be sure to enter the same password in both fields. The password cannot be blank.

Symptom

Error message: The PHP configuration on your server doesn't support the database type that you chose.

Reason 1

PHP actually supports the database system you want to use, but you didn't select it from the installer form's database type field.

Solution

Click your browser's Back button and select the appropriate database type.

Reason 2

Exactly as the message says, your PHP installation doesn't support the selected database system.

Solution

Talk to your hosting provider, or, if you're installing locally, read the PHP documentation on how to enable support for your selected database type.

Symptom

Error message: An error occurred trying to update the database Table ‘phpbb_auth_access' already exists.

Here phpbb_ is the table prefix you've typed in the installer form.

Reason 1

Although very unlikely, it may happen that in your database you have a table totally unrelated to phpBB, having the same name as a phpBB table.

Solution

This is a naming conflict. To get around this, go back and choose a different table prefix.

Reason 2

You're trying to install using a database that already contains a phpBB installation.

Solution

If you want to keep the existing installation, go back to the installer form and simply choose a different prefix. This way you're resolving the naming conflict and you'll have two phpBB installations, which use the same database.

If you don't want to keep the existing installation—for example, it was a failed installation—you have to remove all database tables created by the previous installation. Which tables to remove? You can tell by their prefix. Use the friendly phpMyAdmin to remove those tables, or if you can't use it, connect to MySQL on the command prompt as

described earlier in this chapter, and delete the tables manually. To do so, you need to use the DROP TABLE syntax, which is actually very simple but also a bit dangerous because it deletes a whole database table and its contents permanently.

Time For Action—Deleting phpBB Tables using phpMyAdmin
  1. Load the phpMyAdmin main page.
  2. Select forums from the dropdown on the left-hand side. forums is the database name; use your database name if different.
  3. On the right, where all the tables are displayed, check the box next to each table you want to delete. You can also use the Check All link to select all the tables in this database.
  4. Select Drop from the action options.
Time For Action—Deleting phpBB Tables using phpMyAdmin
Time For Action—Deleting phpBB Tables Using the Command Prompt
  1. Connect to MySQL using the console as described in the pre-install section.
  2. Once you're connected to MySQL, change the database in use, by using u forums, where forums is the name of your database.
  3. List all tables with SHOW TABLES; and then delete them one by one using DROP TABLE table_name_here;.

Alternatively if you're sure there are no tables that you need in this database—that there's nothing but some no-good phpBB tables from a failed installation—you can do it in one shot: after connecting to MySQL, type DROP DATABASE forums;.

This will delete the whole database. Permanently! So be careful. You need to recreate it again for the next installation.

Note

Deleting tables and databases is a one-way process, meaning you can't go back. So think twice before you delete anything. Think about taking backups when you're in doubt before destroying some tables.

Tip

Here's a MySQL query that allows you to quickly back up a table:

CREATE TABLE ‘new_table_name'

SELECT * FROM ‘table_to_back_up';

This will create a new table, called new_table_name in the same current database, and the new table will have the same structure and content as the table named table_to_back_up.

If you want to back up a table in a different database, you can use:

CREATE TABLE ‘new_database'.'new_table_name'

SELECT * FROM ‘source_database'.'table_to_back_up';

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.147.215