Search This Blog

Sunday, September 23, 2007

PHPBB Installation and Configuration...

As i had promised.  The complete step by step guide of what i did to get the forums up and running...

PHPBB, is one of the freely available online bulletin board or forums software.  The beauty of PHPBB is its simplicity yet completely functional and ease of customization.   Though i did not do any customization, if i think i know anything about it. i will walk thru that too.

First and foremost since PHPBB is written in PHP language, you need to have a server which can dish out pages written in PHP.  we have a choice here since it can be configured with IIS or Apache or with any other damn web server software.  But the choices i had was IIS and Apache.  Since i cannot have IIS in my office setup i had to default to Apache. 

Then the next thing is the database.  Here i had a lot of options and also i had the freedom to choose.  Since PHPBB supported both MS and My SQL.  i had a confusion.  which to use.  again since being a open source fan and a slight hatred towards MS i choose MySql.  which leads us to a familiar territory, and that would be AMP setup.

Though i have setup AMP servers in Linux by hands, i had never done that in Windows.  coz for windows there is always a Next -> Next -> Finish thing available.   But this time i had to coz using such a WAMP setup might get me praise in office for setting up a forum, but would cast a serious doubts on my credit status as a GEEK.  So i decided to do the hard way.  and that is why this post is there....

I am giving the steps which i followed and worked for me.  I cannot guarantee you that it will work.  any trouble, you can get to me via comments, and i will try to help you out.  Lets get started.....

Since it is going to be WAMP server, i expect you to have a windows system running, preferably a Win XP or Win 2000 system, with all security fixes, and service packs. This solves the W part...

Apache

Now lets get down how to install Apache. I had downloaded the latest version of Apache which was 2.2.4 at that time from here. I downloaded the windows binary download. if you are the adventurous type you can go for a source compile build install method.   Well like any windows software installation it is pretty much straight forward, Next -> Next -> Finish type.  But still you got to enter some info..

In the third screen where it will ask for Server information. In the First and second text Box, give the Ip address of your system. if you are going to use localhost use the ip 127.0.0.1.  If you have a domain name, then you can give the domain name itself.  But still, i would suggest you to go with the IP Address approach....

Choose the port 80. since you will be wanting the others to access your server. Now after the installation is over, fire up your browser and type http://localhost, you should get a page saying the installation works.  For me it was a page saying "It Works". 

Now put your html pages in the 'htdocs' folder in the installation folder of the server, which should be here C:/Program Files/Apache Software Foundation/Apache2.2/htdocs. now try accessing and you should get your pages...

Now try to access your site from some other system with your system name.  if you are unable to try with the IP address of you system now you should be able to connect.

PHP

Now that we have setup the Apache Web Server, we need to enable it to dish out php pages.  Well first get yourselves a copy of php from here. get the zip one it would give the most flexibility than installer one... ok. now unzip it and store in a place say c:/php. 

Open this file c:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf in your text editor (like notepad)...

Add these 3 lines to it, after the LoadModule lines:
LoadModule php5_module "c:/php/php5apache2_2.dll" (put the path where you have unziped php)

AddType application/x-httpd-php .php .phtml .inc .php3
AddType application/x-httpd-php-source .phps

For Apache to use index.php as the default index page, change the line
DirectoryIndex index.html index.html.var     to
DirectoryIndex index.php index.html index.htm index.html.var

Copy the file "php5ts.dll" to c:\Program Files\Apache Software Foundation\Apache2.2\bin\

Copy the file "php.ini-recommended" to c:\Program Files\Apache Software Foundation\Apache2.2\ and rename it to "php.ini"

For PHP sessions to work properly, you need to specify where to save the sessions. Edit the php.ini file, and find the setting for session.save_path. Set it to "c:\windows\temp\" or another folder you use as a temp directory.

Restart Apache server.  (you will have to restart the apache server each and every time you make changes to the httpd.conf file, for the changes to take effect)

Now you can serve php pages with the server...

MySql

Now comes the last part of the AMP server, the MySql database server.... 

This one is again a very simple installation.  Get the installer for the mysql server, double click setup.exe and keep all default settings and do a Next -> Next -> Finish...

After that you might want to create a database, which you will need for the forums to use.

Now we have make php speak with mysql.  Fire up you favorite text editor and open the php.ini and set the extension_dir variable to your php installation/ext directory i.e. extension_dir="c:/php/ext". see the forward slashes are used instead of the backward slash.

search for these lines and remove the ; before the lines.

extension=php_mysql.dll
extension=php_mysqli.dll

Copy the file libmysql.dll to c:\windows\system32\

Restart Apache...

Thats it you have a WAMP server ready, and running.

PHPBB

Now lets get the forums up and running... This is the most easiest thing in the whole process. I used the 2.0.22 version.

download yourself a copy of PHPBB for here.

unzip in to a directory named 'forums' or whatever you want to name it and move it to the htdocs folder of the Apache Server.

fire up your browser and go to http://localhost/forums. now you will be lead to the installation page. fill in all the details and click install.  and lo you will have it installed in no time. 

Now go to the forums folder and rename the install and contrib to some thing else. (just add a _ after the name that will do)

Now you have a forums running.  Go to the administration panel and create different forums and topics and categories, have some some users register and use it.

Have Fun...

No comments:

Post a Comment