phpBB2 Installation Instructions


If you would like to see how phpBB2 works on Spaceports, I have a test board that you can try out here.

Before You Begin

First, you'll need to download a copy of phpBB2. You can download phpBB 2.0.4 here or get the latest version at phpBB.com.

Next, you'll need a cgi account if you don't have one already. You can apply for one at the Spaceports Member Section.

Now that you have a cgi account, you'll need to activate your MySQL database. This can be done by logging into the Spaceports Member Section using your cgi account information and click on the last button labeled "MySQL". If you log in using your planet account information, then you will not see this button.

You will also need an FTP program if you do not have one already installed on your computer. This tutorial gives instructions for ws_ftp, although any program that allows passive transfers, ascii mode, and chmod can be used. You can download a copy of ws_ftp and view a tutorial at Wysardry's site.


Uploading the Files

Decompress the phpBB2 archive that you downloaded to a local directory on your system. This can be done with a program such as winzip.

Log into your cgi account with your ftp program and open the public_html folder.

Create a folder named phpBB2 and open it (keep in mind that spaceports is case sensitive so phpbb2 is NOT the same as phpBB2.)

Upload all the files that you unzipped to your hard drive (retaining the directory structure) to your phpBB2 folder on your cgi account. All .php, .inc, .sql, and .cfg files must be uploaded in ASCII mode.
The easy way to upload files:
In ws_ftp, click on the Options button on the bottom. Select the extensions tab and then add the following extensions:
.php
.inc
.sql
.cfg
Now, when the Auto option is checked any files with those extensions will be automatically uploaded as an ASCII file. Click OK and go back to your ftp session. Make sure that the Auto option along the bottom is checked. To upload multiple files and folders, click on the first file/folder then hold the Shift key and click on the last file/folder. Upload the files to the server and the program will ask "Do you want to transfer the selected folders and their contents?" Click yes. The program will then create all the required directories for you.


Installing your Board

Enter the following URL into your web browser: http://cgi-bin.spaceports.com/~username/phpBB2/install/install.php (replacing username with your cgi account username.)

The phpBB installation screen should appear. If you get any errors, you will need to correct them before you proceed. Make sure that you have uploaded the appropriate files in ASCII.

For the Basic Configuration, accept the default options (English, MySQL 3.x, and Install.)

Under Database Configuration, use the following settings:
(It is very important that you have activated your mySQL database in config.spaceports.com before proceeding with the installation.)
Database Server Hostname / DSN: localhost
Your Database Name: your cgi account username
Database Username: your cgi account username
Database Password: your cgi account password
Prefix for tables in database: anything what you want, but it's recommended that you use the default "phpbb_".


Under Admin Configuration, use the following settings:
Admin Email Address: your email address
Domain Name: cgi-bin.spaceports.com
Server Port: 80
Script path: /~username/phpBB2/
Administrator Username: whatever you wish
Administrator Password: whatever you wish


You should see a button that says "Finish Installation." If you get any errors, you will need to correct them before you proceed. Make sure that your database information is correct and that you have activated your database in the Spaceports members' section. If you get an error that says "Table 'phpbb_auth_access' already exists" then you will need to log into phpmyadmin and delete (drop) the tables from any previous phpbb installations. To drop the tables, after logging into phpmyadmin click on your database name in the left frame (this frame will take several minutes to load.) A list of tables will then appear in the main frame. Check all of the tables that begin with phpbb_ and then choose the "Drop" option in the pull down menu that says "With Selected:".

Finishing the Installation

Once the installation is successful, then it will ask you to download the config.php file and upload it to your account. Click on the "Download Config" button and save the file to your hard drive where you unzipped your phpbb files, which will overwrite the config file that was previously there. Then log into your cgi account and upload the config.php file to public_html/phpBB2 (in ASCII mode.)

While you're there, you should also delete the folders "install", "docs", and "contrib". Leaving these folders in place is a very serious potential security issue, since someone could wipe out your forum with the files within these folders. If these folders aren't deleted, then you will get an error message if you try to access your forum. To delete a folder in ws_ftp, you will first need to delete any files that are within the folder.

After this step, you can now access your forum using the following url: http://cgi-bin.spaceports.com/~username/phpBB2/ (replacing username with your cgi account username.)


Configuring your Board

There's a few settings that you must change in order for your board to work smoothly. To access the admin section, either click on the link at the bottom of the page that says "Go to Administration Panel" or enter the following url in your browser: http://cgi-bin.spaceports.com/~username/phpBB2/admin/ (replacing username with your cgi account username.)

Cookie Settings

Go into Configuration under General Admin then enter the following:

--------------
Cookie domain: .cgi-bin.spaceports.com
(a . must be in front of cgi-bin)



Changing the Email Settings

Both sendmail and external connections to smtp servers have been disabled on spaceports. Therefore, there is no longer any way to send email to your users through phpbb on spaceports. If you don't configure the email settings for your board, then you will get an error when someone tries to register for your board or sends a pm. To disable email, do the following:
  1. Open includes/emailer.php
  2. Find the function send() and delete everything inside it. The edited function should look like this:
    function send() 
    { 
    
    
    } 
If you're unsure about how to do this, then you can download a file that is already edited for you. Remember to download the correct file for the version of phpbb you've installed.

emailer.php 2.0.4
emailer.php 2.0.5
emailer.php 2.0.6




Avatar Settings

Upload scripts are disabled at spaceports so you will not be able to allow your users to upload avatars. This setting can be disabled in the configuration section under Avatar Settings. Make sure the "Enable avatar uploading" setting is set to "No".

You may still upload an avatar gallery onto your board using ftp. This procedure is explained in The phpBB Users Guide. Other settings

There are also other options in the configuration section that you can change to fit your website, such as site name and description under the General Board Settings.



Putting the required ads on your board

If you haven't paid for ad removal, you'll also need to insert the banner on every page on the cgi server. To do this, open a text editor such as WordPad or NotePad and choose to open a file. Go to where you unzipped the phpbb files. Open the templates folder and then the folder for the theme that you are using (the default is subSilver.) Select the file named "overall_header.tpl" (if you can't see this file, make sure that the "All Documents" is selected under File Type.) After the BODY tag, add the following code (replacing YOURNAME with your cgi account username):

<center> <a target=_blank href=http://www.spaceports.com/cgi-bin/banner.cgi?server=cgi-bin&username=YOURNAME&click=1> <img src=http://www.spaceports.com/cgi-bin/banner.cgi?server=cgi-bin&username=YOURNAME&view=1 height=60 width=468 border=0 alt="Please visit our sponsors."></a> </center>

Now upload the overall_header.tpl file to the appropriate folder on your cgi account.

If you're having trouble finding the body tag, it can be found near the bottom of the file and can be found quickly by doing a search on "<body". The complete body tag looks something like this:
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" />

If you're still having problems finding where to put the code, you can download an overall_header.tpl file that is already edited here.



Other Tidbits

Linking to your board

Direct linking to a page on the spaceports cgi server is prohibited. If you want to give out a link to your board, then you will need to give out your planet account url and then have that page redirect to your board. Also, any links in your emails may come up with an error when clicked in an email program. You will need to advise your users to copy and paste the url. The contents of your emails may be found in language/lang_english/email if you wish to edit the emails to include this advice.



Backing up your database

It is a good idea that you back up your database periodically because spaceports will not make one for you. If their servers go down or your account is deleted, then it's your responsibilty to back up your files. Fortunately phpbb provides a handy database backup utility for you. Go into the admin section and then click the "Backup Database" link under "General Admin".

Restoring your database

Unfortunately, the Restore Database utility in phpbb will not work with spaceports. If you wish to restore a database, then you will need to use phpMyAdmin instead. A public version of this script is provided by Mattford here. After you log in to phpmyadmin, select your database name in the left frame. Then click the SQL tab in the main frame. Open your sql file from your database backup in a text editor such as notepad and then copy and paste the contents into the text box in phpMyAdmin. You may not be able to fit everything in the box, so copy and paste part of it at a time if you encounter this problem.



Follow the rules!

Many people who I have offered help have broken at least one rule when I visit their site. You read the terms of service before you signed up but if you haven't for some reason I would highly recommend that you go here to read them. The spaceports staff goes through sites on the cgi server frequently so make sure your board is in compliance. The most commonly broken rules are as follows:



Feedback

If you have any comments about this tutorial, please email me or you can contact me via AOL instant messenger (screen name: meggie819).

If you're still having problems installing phpBB2, you may post a detailed message at the Spaceports Support Forums in the cgi section. Be sure to include what steps you have taken so far, any error messages you received, and your url.