Trouble Shooting Wiki

Troubleshooting phpBB Installation

From TroubleshootingWiki

Jump to: navigation, search
phpBB
Official Page
Project Documentation
Download
Source Book
200px-1904811914.jpg
ISBN 978-1-904811-91-6
Publisher Packt Publishing
Author(s) Stoyan Stefanov, Jeremy Rogers


This troubleshooting guide is not a comprehensive list; it just contains some common problems that phpBB users have.

Contents

[edit] Some Errors

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

Reason

For some reason, step 5 of the install steps during installation 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 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.

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.

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';

[edit] Security Tips

Making sure that your board is as secure as possible should always be a concern. Here are some tips that can help you get started.

[edit] Administrator Password

Make your administrator password difficult to guess. It's a very important password, so you wouldn't want other people to guess it and play around with your board. This is also true for any moderators you decide to assign later on. Remind them to change their passwords to something really hard to guess. For example, using the same password as the username is definitely not advisable. Be creative and go with something like y0u11n3v3rgue$$ (read "you'll never guess") and wh00p3375 (read "whoopee 75"). It's also a good idea to change this password regularly and to use it only for this board (not for other services like Hotmail and the like). Disallow Remote Connections to the Database

Remote connections allow you to access your database from a remote location. For instance, from your local machine you can query the database that is running on the remote hosting server. This definitely has benefits for example for making local backups of the data in the remote database but it can be a security risk. If the username and password to access the database are somehow revealed, then if the remote connection is enabled, an intruder can access your data from his or her computer. If the remote connection is disabled, the hacker will have to have access to the remote server in order to be able to connect to your database. Additionally with remote connection enabled, the potential hacker can try to guess what your password is by trying different combinations until he or she is connected.

Some hosting providers let you enable/disable remote connections, while some don't allow remote connections at all. Check what your situation is and (unless you have a very good reason) make sure the remote connection is disabled.

[edit] MySQL Account

Use a new MySQL account (or a new account for any other database you might be using for that matter) for the bulletin board. This was described in more detail in the pre-install section of this chapter.

[edit] config.php

After you change the permissions of the config.php file (described in the pre-installation section) so that it's writable by all, and you install phpBB, it's time to revert back. Using the exact same methodology as described before, change the permissions to 664.

Here is a more visual description of the config file after the chmod 664 config.php command. This is a screenshot from an FTP client for Windows.

[edit] .htaccess Protection for the Administration Panel

A little extra layer of protection for the admin panel can be the setting of an .htaccess directory protection. .htaccess is a file that can contain a number of instructions for the Apache web server that are applicable for the directory where the .htaccess file is and to all sub-directories. Setting up .htaccess protection will result in an additional username/password window that will be displayed when you enter the admin panel. Setting up the protection may not be a trivial task, and there are quite a few tutorials that can help you with this available on the Web. .htaccess documentation can be found on the Apache website at http://httpd.apache.org/docs/howto/htaccess.html.

It's possible that your hosting provider gives you access to an easier interface (a control panel) that can help you set up the protection.

So using .htaccess directly or through a friendlier interface you can protect the admin sub-directory within the root phpBB directory using a username and password different than the "normal" administration password. This way you're making it harder for potential intruders as they have two different username/password pair to deal with.

[edit] Finding Help

These are the people that can help you out if you have a problem that you cannot figure out. On phpBB.com, there is a support section that contains "static" articles such as the user guide, the knowledge base, and the FAQ, and there's also the community section (that is not surprisingly powered by phpBB) where phpBB users from around the globe share their experience. The same sort of community of users you can find on phpBBHacks.com.

When you encounter a problem, don't panic; you're not alone, and chances are someone has had and resolved the exact same problem, and this individual is most likely to share the resolution. So it's very probable that the question you have has already been asked and answered. All you need to do is find it. If you can't find the resolution you need, post your question on the bulletin board, but make sure you search first.

Then even though you've found your answer, don't leave right away. You could dawdle for a while and help others with problems that you know how to fix.

[edit] Additional References

  • For instructions on installing phpBB, click here
  • For instructions on troubleshooting phpBB Forums, click here

[edit] Source

The source of this content is Chapter 2: Installing and Configuring phpBB of Building Online Communities with phpBB by Stoyan Stefanov and Jeremy Rogers (Packt Publishing, 2005).

Personal tools