Should I install phpBB?

What are you getting into when you install phpBB? phpBB, open-source forum software for the web, is often simple to install. Most web hosts have a scripting center that allows you to install it on a domain in a few clicks. But should you?

It’s not like there aren’t other forum solutions out there, although arguably phpBB is the one that has survived the longest. To name a few, there is commercial vBulletin software, myBB, Xenforo, Phorum and pUNbb. There are also forum plugins. For example, WordPress has BBPress and BuddyPress. Since I specialize in phpBB I can’t speak with much authority about other forum solutions. However, as a software engineer I can highlight what I think some of phpBB’s strengths and weaknesses are, the subject of today’s posts.

What is forum software exactly?

Before you decide on any forum solution, understand what forum software is. Forum software is not blog software. It’s not a place that you use to rant about stuff that interests you and which others can comment. It is software that allows lots of disparate people to discuss certain topic areas elegantly. It imposes discipline on the content it manages by keeping things organized in forums, topics and posts.

Forum software is used by discrete communities that have something in common and want to share that information in an open manner. Usually what they are discussing is pretty specialized. For example, it might be a support forum for a commercial or open-source product (phpBB.com uses phpBB for its support forum), or a fan site, a bunch of people who own a particular type of boat or plane, whatever! Forum software allows people to create and reply to topics. It’s designed to run independently of a framework. For example, the BBPress plugin for WordPress requires it to work as an add on to WordPress, which means that to use BBPress you must also be a WordPress user on the site. Similarly, Facebook groups can act a bit like a forum, but it requires you to join the Facebook enclave. Facebook however does not organize content in its groups into forums and topics. Most forum software is designed to be standalone, at this is certainly the case of phpBB. It’s not designed to work with WordPress or any other content management system. In our social media age, this is sometimes a drawback.

phpBB’s emergence

phpBB has a long and proud legacy. Version 1.0 was released in 2000, at just the moment that the PHP language became dominant on the web, replacing mostly a lot of Perl scripts. Timing was everything. It was written in PHP, used the popular free MySQL database and was free and open-source. “Open source” was kind of a new thing back then, but it was essential to its growth. Not only was it free, anyone could modify it.  So it got downloaded and installed like crazy. It’s still widely used today. Most support sites run on phpBB. This means you have probably used phpBB already, even if you aren’t aware of it. So it will seem comfortable and familiar, even if you don’t understand why.

Version 2 came a year later in 2001 and is still being used today by many sites because it is fast and lightweight. Version 3 was released in 2007, which thoroughly modernized it. Version 3.1 arrived belatedly in 2016. Its big feature was extensions, similar to WordPress plugins plus responsive styles, so things looked good on mobile devices. Prior to 3.1 if you wanted to extend phpBB’s functionality you installed “mods” that was code changes inside the source code, which made upgrading phpBB difficult. 2016 saw the release of version 3.2, the current version, which looks and behaves a lot like 3.1 but addressed some annoying issues mostly on the backend.

While phpBB was undoubtedly popular, updates were infrequent and its huge legacy base made it hard to push out new versions. Its team of core developers worked inefficiently together, in part because the tools for doing so were relatively primitive at the time. This allowed many other forum solutions to emerge to fill the feature gap while the phpBB group lumbered awkwardly forward into the future.

phpBB’s strengths

I first installed phpBB 2.0 in 2002 and have followed it since then. I have developed modifications and extensions, as well as generating good income from helping users upgrade and migrate their forums. In spite of the phpBB Group’s sometimes lumbering organization, it’s got some major strengths:

  • Institutional legacy. Simply because it’s been around so long, it tends to get widely installed and used. Those who have phpBB forums rarely move to other forum solutions.
  • Familiarity. Most likely you already know how to use phpBB because you have used it on various sites. While the forum/topic/post metaphor is hardly new, phpBB’s implementation of it garnered it a lot of attention and traction, so most forum solutions try to imitate it while addressing its perceived deficiencies.
  • A fanatical devotion to open source. The phpBB Group developers walk the walk on open source. They are really quite devoted to the whole idea of open source software, quite fanatical and arguably more than a little obsessed about it. They don’t give preference to any particular technology (except PHP and web standards like HTML, CSS and Javascript) and try to give you flexibility. For example, most forum solutions are written only for the MySQL database. Despite the fact that hardly anyone who has a phpBB forum uses databases other than MySQL, they support a whole host of other databases including Postgres, SQLite and Oracle.
  • Terrific support. phpBB’s support forums are phenomenal. You will likely find a dozen answers to your question with a simple search but if not a quick post will generate fast response, often from dozens of highly experienced support members, all volunteers. They are so good that in most cases the problems I encounter I don’t have to solve. I can find the solution on their support forums.
  • An anal obsession to standards. This is both a strength and a weakness. WordPress has now something like 40% of the web site market, but WordPress runs fast and loose. It’s not hard at all for people to create buggy plugins and non-optimal themes and WordPress will approve a lot of these. WordPress is a Wild West place where you are never quite sure if what you are adding on is crap or gold. That’s not a problem with phpBB. They go to extraordinary lengths to check their releases for bugs, running them against a host of security tools and making the base code pass thousands of detailed automated tests. I doubt there is an open source project that releases higher quality code. As an extension author, I am impressed and sometimes annoyed by how difficult it is to get my extensions approved. They inspect everything with incredible care and make sure you adhere to their voluminous and often somewhat obscure coding standards. This also makes things slow as there are plenty of extensions and styles in the review queue and reviews can take months. Rest assured though that officially approved extensions and styles are top quality.

phpBB’s weaknesses

  • Lack of agility. The phpBB Group’s tendency toward being anal also means they are not agile. It’s hard to bring out new versions of phpBB since everything must be nitpicked to death. Arguably this is also because there are tons of features and options in phpBB; look through all the Administration Control Panel’s various screens sometimes to get an idea of how many features can be changed, enabled and disabled. Its permissions system alone is awesomely powerful while awesomely obscure. When finally released, new versions tend to be very stable and rock solid but if you are an impatient person, your patience will definitely be tested and then some. On the other hand, their development practices are top notch. They use state-of-the-art testing, development and bug tracking tools. They have daily builds of their software to see what breaks.
  • Legacy architectureAdding new features tends to be excruciatingly difficult not because their code is not modular enough (this problem largely went away with phpBB 3.1) but because the database is so baked in. Many features would mean large changes to the database. Business logic is baked into many different programs, although phpBB 3.1 introduced classes (the whole /phpbb folder) that addressed a fair amount of this problem.
  • No multi-threaded topics. This means you can’t see a set of replies to a particular post within a topic, or get a hierarchical view of replies to a topic.
  • Standalone. It doesn’t integrate with anything, at least not elegantly. It won’t work seamlessly with your content management system, like WordPress. The closest it comes to this is that it supports authentication via LDAP (Lightweight Directory Access Protocol), but even so users must still create accounts on the forum to use it.

There is a lot more to this topic that I may delve into in future posts. But this post at least gives you a heads up. phpBB is great software: stable, reliable, well tested and industrial strength. If you can live with its functionality and limitations and are okay if the features change slowly at best, it’s still a terrific solution. If you need more agility from your forum solution, you might have to look elsewhere. However, any other solution you pick may not hang around. phpBB is eighteen years old and is likely to survive another eighteen years without a sweat.

 

Why does my forum’s performance suck?

With growth or just with the passage of time, phpBB forums can slow down. Pages may take a while to load if they load at all. You might get HTTP 500, 403 or other errors.

Today, site visitors expect fast response and if they don’t get it they may just decide it’s not worth coming to your forum. However, troubleshooting the root cause of these problems can be hard.

Often just opening a support ticket with your web host will bring you resolution. Or not. Web hosts run the gamut from poor to excellent, and generally the less you pay the poorer the service is. Web hosts though often know what the problems are, they just don’t want to tell you, as it makes them look bad. They may want you to pay for a higher quality of hosting to “solve” a problem that is really their fault, because they don’t maintain their infrastructure properly.

Here are some reasons that may be at the heart of your forum’s performance problems:

  1. Increased traffic. The traffic may not be traffic to your forum, but to other websites hosted on the same machine (server) as your website, if you are using shared hosting. This used to be a huge problem. Hosts would overload servers with domains because it was cheaper than going out and buying new machines. This works for a while until enough customers complain. The smart customers rehost somewhere else but obviously their hosts are hoping the rest won’t bail because it’s too much hassle. If traffic is getting consistently slower over a relatively short period of time or you are seeing a consistent increase in 500, 403 or similar error pages while using shared hosting, this is probably the reason. If your site is getting massively more traffic than you did before you might need to upgrade your hosting to a virtual private server or possibly even a dedicated server. Web hosts usually provide reports on usage that will help you get an idea if this might be the cause.
  2. Old hardwareThe law of entropy states that over time systems must degrade, i.e. become more complex or inefficient. It happens to your host’s servers too. Your website may be on a server that is ten years old, or has insufficient memory or CPU power for today’s needier software. So work may go into a queue until the CPU can catch its breath. While you are waiting of course nothing is happening. One clue may be to check the software installed on a server. For example, if you look in phpMyAdmin and you find that your MySQL database is running version 5.1 (released in 2008) then maybe your server is 2008 vintage, or older. Today MySQL 5.5 is generally the minimum version installed, with 5.7 being the newest and shiniest.
  3. Underpowered servers. Your server may not really have sufficient resources (CPUs, disk drives, etc.) to handle the traffic that is on it.
  4. Resource limitations. With shared hosting in particular there are implicit and generally poorly understood limits on the number of “resources” you can use: files, memory, CPU time or units of database work. You will usually see errors like this when they happen. They mean generally two things: either you are outgrowing your hosting or your server is overcommitted with other domains it is supporting. If your traffic is pretty steady, it’s more likely the latter problem. This is a sign of a poor host. You might want to rehost.
  5. Dated software. I mentioned that a host still running MySQL 5.1 is a yellow flag of caution. It’s not that MySQL 5.1 was a bad version, but many new features and performance improvements have been added since 2008. Your forum’s software has probably gotten more complex so it could use those improvements. Similarly, hosts running PHP 4 (fortunately, there are very few of these left) or even PHP 5.2 need to update their technology stack. You can see your version of PHP, web server software, operating system and the database in the Administration Control Panel, PHP information. Even the web server software you use can be dated. Still on Apache 1.2? You should probably be hosting somewhere else.
  6. You’ve been hacked! This happens rather infrequently, but it does occur from time to time. Malware or other bogus code may have infected your phpBB programs, templates and stylesheets, chewing up CPU and worse possibly infecting your readers’ computers with malware. Needless to say any malware must be removed. It may be discovered by comparing your software with a reference version of phpBB that you are using.
  7. Your database needs tuning. With so many reads and writes, your database may have grown and scattered itself all over the server’s disk platters, making it time consuming for the database management system to read and write data. You can try repairing and optimizing your forum’s tables in phpMyAdmin or a similar tool and see if performance improves.
  8. Your database is not properly configured. You may be missing primary keys, or indexes for tables. In some cases certain standard columns (added with upgrades) end up missing. Primary keys and indexes are used to retrieve data quickly. If they are missing the database won’t complain, but it will read all rows in a table to get what it needs, which is highly inefficient and can make a forum crawl. These sorts of problems are often the result of database updates that never finished properly, although they may have said they did. This can happen frequently upgrading from phpBB 3.0 to 3.1.
  9. Your phpBB version is woefully out of date. I am still surprised by requests that I get to upgrade phpBB 2 forums. phpBB 3.0 was released in late 2007! The problem is often not phpBB 2 itself, but your PHP version, which has evolved, making the handshake between PHP and phpBB awkward and inefficient, if it doesn’t trigger PHP warnings or errors. Upgrades are never fun or painless, but something you need to keep up on.
  10. You need to use a different database. Typically phpBB is used with the MySQL database because it’s free. phpBB at least in theory supports a host of other databases including SQLite and SQLServer. Most of the testing is done against MySQL and really phpBB is optimized for use with MySQL or its clone MariaDB. You will probably see better performance if you stick with these databases.
  11. You are using Microsoft software on the server. IIS is Microsoft’s web server. If you are running IIS you are also on a server using a Microsoft server operating system. IIS is not a bad web server but it works suboptimally with phpBB. phpBB should work best in a standard environment. So if you have the option to move to a Linux/Apache web server you may find marked performance improvement.
  12. Your browser is old. phpBB expects a reasonably modern browser. If others aren’t having issues but you are, maybe it’s time to upgrade your browser from IE7 or Firefox 2. Stick with recent versions of browsers like Firefox, Chrome, Safari and Opera.

There are other reasons your forum could be slow, but most likely the cause is one or more of the above. If you don’t feel you have the expertise to troubleshoot these issues yourself, or simply would rather have it done professionally, send me a service inquiry.