Integrating phpBB with Drupal

How do we keep this site running? This post may contain affiliate links — the cost is the same to you, but we get a referral fee. Compensation does not affect rankings. Thanks!

Drupal integrating phpBBIntegrating phpBB with Drupal can be quite simple. While Drupal’s forums function fine and provide simple forum functionality, many users want the advanced functionality and extra features that bulletin board applications such as phpBB provide. However, getting the two to work together can be a real pain. So here’s a tutorial on integrating the two. In this example we use Drupal 4.7.x and phpBB 2.0.x. We can’t guarantee that this tutorial will work for other versions, although it may be worth a shot. Finally, this tutorial assumes that you already have a working Drupal installation.

The first thing you’ll want to do is follow the below checklist to ensure that Drupal is ready for phpBB integration:

  • Under administer -> settings -> general settings -> “clean url’s” make sure clean URL’s are enabled.
  • Make sure your /files directory is accessible by chmod’ing its permissions to 777.
  • Make sure you have the “profile” and “private message” (to take over phpBB’s private messaging functionality) modules installed.
  • Make sure you have avatars enabled: admin -> settings -> user -> pictures -> “enable”
  • Drupal user 2 (accessible via /user/2) will be the super administrator of your phpBB forum, and they will need to have the same name in phpBB as they do in Drupal, so if at this time you need to change the name of user 2 do so (and remember the name for the phpBB installation below).

Obtaining and installing phpBB

Next you’ll want to download phpBB from the phpBB site and follow the steps below:

  • Extract and upload the main forum directory (named “phpBB2” by default – you may change this to any name you wish, in this example we name it “forum”) into your root Drupal directory.
    • note: If you also have Drupal’s native forum module installed don’t name your phpBB installation “forum,” as it will conflict.
  • Within this directory, make the config.php configuration file write-able by chmod’ing it to 666.
  • Browse to /<phpbb forum name>/install/install.php to begin phpBB installation.

phpBB Installation Steps

  • Under “basic configuration,” make sure the database type (ie. “MySQL 4.x/5.x”) matches your Drupal database type.
  • Under “database configuration,” you’ll want to use the same database, username, and password that your Drupal database uses.
  • Leave the prefix for database tables as is (“phpbb_” by default).
  • Under “admin configuration,” enter an admin email address (usually the same as your Drupal admin)
  • Important – if you are using .htaccess to specify a “www” vs. “non-www” redirect, that you enter the correct version here (otherwise you’ll get redirect problems after installing)
  • Enter the name and password of Drupal user 2 (/user/2) as your “Administrator Username” and “Administrator Password.”
  • Press “Start Install”
  • If you see errors post below and we’ll help you out.
  • If installation was successful pat yourself on the back and proceed to delete your “install” and “contrib” directories before continuing.

Configure phpBB for integration with Drupal

Log into your phpBB administration panel, click “configuration” (under “general admin”), and change the following settings (leaving everything else as is):

  • Note: If you have trouble logging in, access your phpBB forum installation directly by typing your forum name with a trailing slash (ie. example.com/forum/).
  • Feel free to update “site name” and “site description” to reflect your site (optional).
  • Enable account activation – change to “admin”
  • Private messaging – set to “disabled” (we will be using Drupal’s built-in PM module instead)
  • Enable avatar uploading – change to “yes”
  • Avatar storage path – change to “../”
  • And finally – specify your email signature (optional).
  • Click “submit” to save changes.

Installing and configuring Drupal’s “phpbb” module

Next you’ll want to download and install Drupal’s phpbb module. Once installed:

  • Browse to admin -> settings -> phpbb and adjust “location” and “absolute path” of phpbb to reflect your phpBB’s installation directory.
  • Browse to admin -> access control and grant access to “administer phpbb” for the admin role of user 2 (and whomever else you assign as administrator for the forum).
  • Copy the file “phpbb.htaccess” from the phpbb module directory to your phpBB forums’ root directory and rename it to “.htaccess”.

Good to go!

At this point everything should be working. You can test the setup by logging out of your forum as well as your Drupal site; logging back into Drupal as user 2 and then accessing the forum. You should automatically be logged in as forum super administrator and see a link allowing you to access phpBB’s administration panel.

Assigning Multiple Administrators (Optional)

At this point you can log in as user/2, go into your phpBB administration panel, and from there click on “Go to Administration Panel,” and take the following steps to create an “Administrator” group:

  • Click on “Management” under “Group Admin” at left
  • Click “create new group”, give the group name “Administrators,” type the name of user/2 as moderator (since the super admin should moderate admins), and mark the group as “hidden.” Click “submit.”
  • Browse to “Permissions” under “User Admin,” type the name of a user you’d like to promote to administrator, and click “Look up user.”
  • On the next screen select “Administrator” from the “User Level” drop-down box at top left, and click “Submit.”
  • Voila – that user is now an admin, and upon logging in to Drupal and accessing your phpBB forum will see the “go to Administration Panel” link at bottom.

Troubleshooting

If you’re having troubles, please post below.

Alex bring a series of in-depth articles on search marketing and content management systems as well as troubleshooting tips to We Rock Your Web's collection. He is an avid tennis player, nature enthusiast, and hiker, and enjoys spending time with his wife, friends, and dogs, Bella and Lily.

Leave a Reply

62 Comments on "Integrating phpBB with Drupal"

avatar
udit
udit

please help me to solve this error

Error locating phpBB installation. Please fix your settings!
Error locating C:\xampp\htdocs\drupal-7.26\phpbbforum\includesincludes/phpbbdrupalbridge/phpbb_api.php. Please fix your settings!
Unable to connect to the phpBB database. Please fix your settings!

ali

Hi i have a problem, my admin panel is working well but it is not working with drupal i have the following error:

Error locating phpBB installation. Please fix your settings!

Error locating /var/chroot/home/content/s/k/e/skelsmerghpc/test/phpBB3/includes/phpbbdrupalbridge/phpbb_api.php. Please fix your settings!

Unable to connect to the phpBB database. Please fix your settings!

Anonymous
Anonymous

How can I change my website address name?

Anonymous
Anonymous

Well I just wanted to post that I think the wordpress/bbpress configuration is a good alternative to the drupal/phpbb integration described here. The thing is, bbPress is made by the same people who make wordpress, so integration is simple as it gets, and with all the plugins and themes available today, I think it can do anything Drupal can. Check my site if you’re interested in installing wordpress, once you do that you can install bbpress and connect the two.

Integrating drupal and phpBB is COOL TOO.. I’ve also done that before, but my strategies have evolved :]

Anonymous
Anonymous

I’d like to integrate, if not migrate, transfer my users/forums/posts to Drupal 7. Anyone working on this?

Anonymous
Anonymous

We’ve been considering adding a phpbb forum to our website, but the only fear that we have is that it will be bombarded with spam! Any suggestions?

Anonymous
Anonymous

Stopped by, love this site – full of useful information.

Anonymous
Anonymous

Aloha all, fine forum I find It amply useful & it’s helped me tons I hope to contribute & support other people like this board has helped me.

Anonymous
Anonymous

Is it possible to contact an administration? I’m hoping for an answer.

Anonymous
Anonymous

What do you think about WIKILEAKS? Thanks

Anonymous
Anonymous

I tried integrating phpbb3 with Drupal and spent about 6 weeks on it. It just would not play ball. The plugin is not actively maintained and support is non-existent.

I then went over to WordPress and WP-United. What a difference!!! This works fantastically. The support is great, more than I could ever wish for. I can’t speak highly enough of the WP-United plugin/mod and the team. No connection, just a very happy customer!!

Post by Albert

Anonymous
Anonymous

I had ago with this, but the trouble I found was because people didn’t see their name on the forum list they assumed that their Drupal account wouldn’t work.

Is there a way to populate the phpBB forum list with my Drupal accounts?

Anonymous
Anonymous

It seems that everytime phpBB comes out with a new version, the integration issues with Drupal get worse. I noticed that CWD uses bbPress, so I gave it a try. Wow – what a difference! So simple, easy to use, and SEO friendly (thanks to its WordPress parent).

My only question is – how did you get the latest 5 bbPress topics to appear in a block on your Drupal site?

We Rock Your Web
We Rock Your Web

Great question. I’ve posted an answer in our forum.

Anonymous
Anonymous

phpBB is a great, lightweight, and SEO-friendly forum. However, we’re unaware of any Drupal plugins at this time. but i’m liking the SEO capabilities. Thanks.

Anonymous
Anonymous

PHP is a little complicated. But if you put your mind to it it can really simplify your site. Thanks for the post.

Anonymous
Anonymous

I think it could definitely be a lot more user friendly and it needs more features for sure.

Anonymous
Anonymous

Hello, I’ve registered because this board is running very slowly today. I would like to know if others also experience this?
Using this forum at this speed is very uncomfortable!

We Rock Your Web
We Rock Your Web

It’s uncomfortable for you because all you do is spam our site. We moderate all our comments, and most of yours, being flagged as spam, get deleted.

Anonymous
Anonymous

I I have got it running but it still does not give you the same functionality that you can achieve with typo 3. I know it takes a little more learning but its worth it in the end if you want more than just a forum. Typo 3 gives you a full e commerce platform.

Anonymous
Anonymous

I would definitely like to see some additional features and functionality. I agree that typo 3 has better functionality.

Anonymous
Anonymous

Great blog thanks for sharing this info with me. I will be using it really soon.

Anonymous
Anonymous

bbPress conversation conveniently placed inside this topic by all anonymous users is an obvious plug for a new forum on a different site. I suggest each of those posts being deleted for irrelevancy, and a virtual middle finger to the author of this kind of recruiting tactic.

We Rock Your Web
We Rock Your Web

Considering the amount of spam we filter, it’s likely that posts, after links have been stripped – look spammy because of their generic content (ie. “great post”, etc.). 99% of comments are anonymous because people don’t want to go through the registration process. That’s why we allow anonymous comments. This community gets 100k+ visitors/ month, and we have at least a dozen comments in the queue to approve every few days, so there’s no need for us to go in and post “fake” comments.

Anonymous
Anonymous

This is great. Thanks so much for sharing. I loved the advice!

Anonymous
Anonymous

Has this ever been updated? Drupal 4.7 and phpbb2 is nice but what about drupal 6? A link would be enough if anyone has one. It’s ok if it’s drupal 6 and phpbb2 or phpbb3. I know of the module that is supposed to work with drupal 6 but I see NO documentation on how to use it.

:/ phpbb2drupal

Thanks

Anonymous
Anonymous

Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!

Anonymous
Anonymous

I installed following this steps. It worked very easily. Thanks for the post.

Anonymous
Anonymous

This is great. Thanks so much for sharing. I loved the advice!

Anonymous
Anonymous

I installed following this steps. It worked very easily. Thanks for the post.

Regards,
Earvin James

Anonymous
Anonymous

What about bbPress (the relatively new WordPress forum)? Is there a way to display bbPress forum comments/ posts in the sidebar of a Drupal site?

We Rock Your Web
We Rock Your Web

Great question – we actually use bbPress as you’ll see if you visit our forum

It’s a great, lightweight, and SEO-friendly forum. However, we’re unaware of any Drupal plugins at this time, probably due to it being so new. But look for one to be developed soon!

Anonymous
Anonymous

I found this module really great! It works on me properly. I really prefer Drupal more than any other CMS. Great post!

Anonymous
Anonymous

Great post very useful info, but I’m agreeing with the last comment. After trying Drupal for two weeks I’m tired of these problems, problems and more problems. Even with all this support, when I fix something I get a new problem. I will go back to WordPress now.

Anonymous
Anonymous

Well I’m thinking about moving back to WordPress. Somebody says to me that Drupal is more expandable and has a large support and knowledge on the Net, but I’m facing one problem after another. Don’t get me wrong, your post is great, but I’m getting a little confused in some places.

Anonymous
Anonymous

I had this module installed and working properly. Our DNS was moved over from a .us to .com, and now phpBB will not keep me logged in. Any ideas?

Anonymous
Anonymous

phpBB is okay, but I prefer the stability and security of vBulletin. Is it possible to use vBulletin with Drupal as well?

Anonymous
Anonymous

I will opt for WordPress as it is most effective in Internet marketing…

Anonymous
Anonymous

Nice article, although I’m starting to get fed up with all the errors I’m getting. Has anyone tried integrating another forum software with Drupal? Any success?

Anonymous
Anonymous

Heya,

I had this module installed and working properly. Our DNS was moved over from a .us to .com, and now phpBB will not keep me logged in, any ideas??

Thanks!

We Rock Your Web
We Rock Your Web

Hi there,

It sounds like the domain name is stored somewhere. Check your phpBB settings and make sure the domain extension is updated. You might also want to make sure your browser is allowing cookies for the .us domain.

Anonymous
Anonymous

Hi,

is is possible to shift the existing users in the db of phpbb and add 50 to all of them? E.g. user_id 3 is google bot. That should be user_id 53. Why these users already exists after installation?
Because I have already 20 user in my drupal installation and can’t shift these.
Cheers
Belo

Anonymous
Anonymous

Tweak Drupal’s user sequence. phpBB creates users for the different search engines. Their user id will overlap with users in Drupal, so we need to make sure Drupal does not overwrite them.

Use something like phpMyAdmin to look at the table “drupal_sequences”, and update the row with name “drupal_users_uid” to have id = 1000:

UPDATE `databasename`.`drupal_sequences` SET `id` = '1000' WHERE `drupal_sequences`.`name` = 'drupal_users_uid' LIMIT 1 ;

Note: If you are starting with a database that already has users, just make sure the sequence number is set to something higher than the largest existing user id, and leave at least 50 to spare.

-Daniel

We Rock Your Web
We Rock Your Web

Good tip! Thanks Daniel.
Cheers,

Anonymous
Anonymous

When I activate phpbb module I get this message:

user warning: Table ‘mysite_db.phpbb_users’ doesn’t exist query: SELECT user_unread_privmsg FROM phpbb_users WHERE user_id = 2 in /home/mysite/public_html/includes/database.mysql.inc on line 172

What did I do wrong? I have 200 something users in my drupal website and I want to start new phpBB forum.

Anonymous
Anonymous

I am not able to see phpbb in the settings page. I have enabled it. I dont know where am I going wrong.

I am not able to do this step.
—- Browse to admin -> settings -> phpbb and adjust “location” and “absolute path” of phpbb to reflect your phpBB’s installation directory.

Please help me.

Thanks,
Nithin.
-Bluminut.

alexc
alexc

What versions of phpBB and Drupal are you using?

Anonymous
Anonymous

please help.. i really need this to work. i get this error message.

Query failed: Unknown column ‘user_level’ in ‘field list’ UPDATE phpbb_users SET `user_password`=’3ee466638afdccd16da7a8314c7893da’, `user_level`=’1′, `username`=’admin_phpbb’ WHERE `user_id`=2

this is what i get when i try to log into drupal as user number 2.
then if i hit the back button get a few more of similar errors and then get sent to the front page.
if i try to go to phpBB3 i am not logged in as admin_php.

where did i go wrong?

thanks
Richard

vig

Share phpbb3 users and drupal 7, please explain the step by step procedure.

alexc
alexc

What versions are you using of the following:

– Drupal
– phpBB
– phpBB drupal module

Anonymous
Anonymous

After saving the paths for the phpbb module, I login and get [function.include] errors.

I have drupal in the root of my site and the forum in /forum/ am I sposed to have the forum in /forum/phpBB2/ ?

warning: include(/forum/config.php) [function.include]: failed to open stream: No such file or directory in …an.com/modules/phpbb/phpbb.module … line 304
and
warning: include() [function.include]: Failed opening ‘/forum/config.php’ for inclusion (include_path=’.:/usr/local/php5/lib/php:/usr/local/lib/php’) in …an.com/modules/phpbb/phpbb.module on line 304.

i don’t fully understand these, other than , it cannot find the file. Can someone please care to help me out.

Thanks

alexc
alexc

Drupal could be confusing the native Drupal forums at /forum/ with your phpBB2 installation. Try installing to an entirely separate directory such as /forum2/

Anonymous
Anonymous

PHP is new to me but I got it fixed by manually including the variables from the config file into the .module. Though I wouldn’t recommend this as it will brake if you move databases.

Does anyone know how exactly I put the forum into an iframe in drupal so it has better integration. I’ve seen it done on the Norwegian example sites.

thanks

We Rock Your Web
We Rock Your Web

You’ll want to place a div around it to control its location and positioning, and you’ll probably want to get rid of the borders. Here’s an example:

<div style=”height: 600px;”><iframe width=”100%” height=”100%” frameborder=”0″ src=”#” border=”0″> </iframe></div></code>

Anonymous
Anonymous

I also want to know about how to make mine like the Norwegian example sites. I see the code, but where do I put that code? In the drupal template page.tpl.php file? Or…???

alexc
alexc

If you want it to appear on every page of the site you could place it in the page.tpl.php file. If you want it on one page only, place it in the node you’d like the iframe to appear in, making sure the input format is “full html” or higher to allow iframes.

You can also control its appearance by placing it in a block, or writing conditional statements in your page.tpl.php or node.tpl.php file. Finally, you could write a function and place it in your template file and call it from your theme files.

Anonymous
Anonymous

Thanks for the guide! Everything is working great for the integration except…

…I can’t get the “avatar storage path” to stick with just ../ as it doesn’t seem to like it for whatever reason. I put in the ../files/userpics (which is where I have drupal set to store avatars and it accepts that.

Except now, it views my user’s pics as X boxes, because of course it thinks the links back to the pictures are *host*/files/userpics/files/userpics/example.jpg instead of what it should be.

Can you give me any advice on this problem?

Thanks!

alexc
alexc

How many directories down from your root is your forum located? For example, if your forum is at example.com/forum/ you can access the files directory via ../files. However, if your forum is at example.com/dir/forum, you’ll need to go up two directories by using ../../files (you go up one directory for each ../).

If that doesn’t work, have you tried using an absolute path – ie. example(dot)com/files/userpics?

Anonymous
Anonymous

I installed following this steps and all works fine. I like it!!! cool

Anonymous
Anonymous

How come my BBCode in Drupal doesn’t work after following this walkthrough? My users are Pi$$ed that they can’t have nice signatures

Thanks for the guide btw its very clean and informative!

wpDiscuz

Send this to a friend