phpBB 3.3 is released!

Two days ago, the phpBB group released its latest minor version of phpBB: 3.3, also known as Proteus. You can learn more about it on its launch page. To give you some perspective, phpBB 3.2, the last minor version, was released on December 9, 2016. So it’s been three years since the last minor release of phpBB.

I looked at a development version a couple of weeks back. So I was kind of taken by surprise by 3.3’s sudden release. Minor versions tend to introduce some new functionality, and Proteus does. It’s just that for most administrators and users, it won’t seem like that big a deal and things will look and behave pretty much the way they always have. As with phpBB 3.2’s introduction, most of its changes are covert, rather than overt. Unless you know what you are looking for, you won’t notice much.

New logo

One hard-to-miss feature, at least if you use the default proSilver style, is the phpBB logo is different. It’s now a Scalable Vector Graphic (SVG), which makes it look crisp and shiny in all resolutions, including retinal displays. It looks a tad bigger, but also more white and almost glossy. Also, the logo includes the words “forum software”, which is new. Previously, the logo was a transparent GIF and it said “Creating communities”.

New phpBB logo
New phpBB logo

Updating is getting easier

Updating phpBB is getting easier too. It won’t compare to updating WordPress, which takes place entirely behind the scenes and can be done with a single click. The exact mechanics of how it will work is unknown until 3.3.1 is released. But the launch page says:

“With our brand new installer updating will be easier than ever in phpBB 3.3! Upload a single folder to your board and all your files will automatically be replaced.”

This will be welcome because updating has always been a hassle. Over time, it may affect my income a bit since a lot of it comes from updates. I expect a lot of my customers will still want me to do this as a service.

You will still need to upload one file, an archive. I also expect there will be a number of other manual steps, because there will always be issues of overwriting custom changes to styles and extensions that may have issues. You will probably have to back up your styles and extensions folder manually before updating. Time will tell.

New PHP requirements

Proteus requires PHP 7.1.3 or higher, and cannot use a version of PHP greater than 7.4. So many administrators will have to upgrade PHP first, which may be an issue for those using PHP 5.4 and 5.6. They will finally have to take the plunge.

Most likely a lot of these boards will have an issue: they will need to edit their config.php file to tell phpBB to use mysqli drivers instead of mysql drivers. So far, fixing this issue has not been intuitive.

Overall, taking the plunge to PHP 7 is good: twice the performance compared with PHP 5 and phpBB can use many new features in PHP 7 too. I have noticed some extensions have issues with PHP 7, however, for example the AWS S3 extension.

Upgrading from phpBB 3.2

The upgrade process from 3.2 is pretty much unchanged from 3.1 to 3.2, and will be more manual in nature than the newer upgrade process. You can see the steps required here.

Improved Emoji support

From a user’s perspective, the exciting feature is likely to be increased Emoji support. Previously, only certain Emoji characters could be used, and only in post text. Now you can use virtually any Emoji character, and you can use them in topic titles too. However, you cannot use Emoji in the subject line of topic replies.

The Emoji in topic titles permission is enabled by default. If you want to disallow it, the easiest way is to change a user role, like Standard Features. ACP > Permissions > Permission roles > User roles > [Role name]. Click on the green wheel for the role. See illustration:

New emoji in topic titles permission
New emoji in topic titles permission

Over time, phpBB forums will look a lot more colorful and visual.

No support for IE before IE11

Also with Proteus, phpBB essentially gives up caring about Internet Explorer versions 7-10. It’s not that phpBB won’t render pages with these older browsers, but certain features won’t work or may behave quirkily. This is because to do fancier things, phpBB relies on a Javascript library called jQuery. It now uses a newer version of jQuery which is not compatible with these older browsers. The phpBB Group’s rationale is that since Microsoft won’t support old versions of Internet Explorer, they don’t have to either.

Some other features they are highlighting:

  • Clever quotes. Quotes can show a link to the post and post author. It can also show the date and time of the quoted post.
  • Improved reCAPTCHA. Previously only reCAPTCHA V2 Checkbox was allowed for a reCAPTCHA solution. Now you can use the Invisible reCAPTCHA V2. One consequence of this is that the V2 Checkbox is no longer supported, so as part of upgrading phpBB to 3.3 you should have to get a new set of reCAPTCHA keys from Google’s reCAPTCHA site that support this method, and plug them into the Spambot Countermeasures area in the ACP.
  • Notifications are supposed to be very fast now. The whole notifications process has been reengineered. It’s unclear if this means email notifications are sped up. I’m pretty sure they will go into phpBB’s mail queue like they do now, so your Email settings should apply.
  • FontAwesome improvements. In phpBB 3.2, phpBB supported a rather limited set of scalable FontAwesome characters. The number supported are now much larger, and they will all look fine on retinal displays.
  • Symfony 3.4. This is behind the scenes stuff, but phpBB 3.3 uses a newer version of the Symfony PHP libraries, including its heavily used template engine.
  • ACP Statistics screen is now responsive. As noted in my first look, the statistics panel in the ACP now splits statistics into two groups, which has the benefit of making the screen responsive. You can see the new look below:
New ACP Statistics screen
New ACP Statistics screen

Should you upgrade?

You probably don’t want to upgrade right away. This is because some of your extensions may not work and if you made changes to your style, those won’t carry over so they will need to be replicated.

However, the same day the phpBB Group also released phpBB 3.2.9, which brings over some of these features including Emoji support. You might want to update to that version for a few months until extensions and your style becomes compatible with phpBB 3.3.

 

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.

Changing your phpBB tables’ storage engine

Note: this post was updated October 17, 2019.

Most phpBB forums use the MySQL database to hold the forum’s data. It’s an obvious choice because community editions are free and it comes bundled with your hosting package. If your database is MariaDB, don’t worry. These instructions work for MariaDB too. Why? It’s because MariaDB is a clone of an earlier community edition of MySQL. Functionally, it is virtually identical.

When MySQL was first created, there were few storage engines available. Storage engines contain the code (software) and internal data structure for storing data in tables. Consequently unless you have created a new forum it’s likely that your forum’s tables use the old MYISAM storage engine.

With phpBB 3.1, the default storage engine for phpBB tables using MySQL and MariaDB has changed from MYISAM to INNODB. However, the conversion program from 3.0 to 3.1 will not change the storage engine. INNODB is a different way of storing the data in a table. It’s generally more self sufficient than MYISAM and you are less likely to need to repair it. INNODB tables are best used for tables that are frequently read and written to. In fact, the REPAIR command does not work on tables using the INNODB engine.

I generally recommend to my clients to change their tables’ storage engines to INNODB because they are less likely to have issues. I see clients that struggle through issues like the sessions table needs to be repaired and they don’t know how to do it. Sometimes tables using MYISAM just get inconsistent leading to issues such as orphaned posts.

phpMyAdmin is a tool generally provided by your web host in its control panel. While you can change your storage engine in phpMyAdmin, it’s not intuitive. There is nothing in the software that allows you to do this in the user interface. You can do it on the SQL tab, however. You can use phpMyAdmin to change your storage engine but you can also do it from SSH with the right privileges by running the mysql command. These instructions assume phpMyAdmin is used. A few caveats:

  • Backup your database first.
  • You should disable your forum during the process. Users might get error messages or timeouts while this is happening.
  • The more posts and users you have the longer it will take. Generally it takes only a few minutes. It’s possible that phpMyAdmin will time out. In this case go back in when you can, see which tables have been converted and convert any remaining tables. Simply look at the tables for your forum’s database and examine the TYPE column to see which tables remain to be done, which are those where the type still shows MyISAM.
  • If your sessions table uses a MEMORY storage engine, this is fine. You might want to use MEMORY for the sessions table only because the sessions table is accessed very frequently. The MEMORY storage engine very fast because nothing is stored to a file, but if the database server crashes or is rebooted all the rows in MEMORY tables are lost. This is okay in the case of the sessions table. It just means that people have to log in again.

These instructions assume you are using phpMyAdmin.

  1. Look at your config.php file for your forum. You can download it with FTP or you can view it in your web host control panel’s file manager. It should look something like this:
<?php
// phpBB 3.2.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'phpbb\\db\\driver\\mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'forum_database';
$dbuser = 'forum_admin';
$dbpasswd = 'forum_password';
$table_prefix = 'phpbb_';
$phpbb_adm_relative_path = 'adm/';
$acm_type = 'phpbb\\cache\\driver\\file';

@define('PHPBB_INSTALLED', true);
// @define('PHPBB_DISPLAY_LOAD_TIME', true);
@define('PHPBB_ENVIRONMENT', 'production');
// @define('DEBUG_CONTAINER', true);
  1. Make a note of the value for $dbname
  2. Log into phpMyAdmin
  3. Select the database containing your forum, which is the same as the value of $dbname.
  4. You can see your tables’ storage engine in the TYPE column. If you are already using INNODB for all your tables there is no point in doing anything.
  5. Click on the SQL tab.
  6. Copy and paste the SQL below into the window. Replace the value in quotes for dbname with the value of the variable $dbname in your config.php file. The result of the query is a bit strange, because it renders SQL. You will use the generated SQL to actually change the storage engine.
SELECT CONCAT('ALTER TABLE ', TABLE_NAME, ' ENGINE=INNODB;') 
FROM information_schema.TABLES 
WHERE TABLE_SCHEMA = 'dbname' AND engine = 'MyISAM'
  1. It will render a list like this. In most cases the tables will start with “phpbb_” but if it doesn’t don’t worry. The tables should start with the value of $table_prefix in your config.php file. Note that what the previous query does is construct the SQL you need to change the storage engines, but only where the current engine is MYISAM. Only a few rows are shown for demonstration purposes.
...
ALTER TABLE phpbb_banlist ENGINE=INNODB; 
ALTER TABLE phpbb_bbcodes ENGINE=INNODB; 
ALTER TABLE phpbb_bookmarks ENGINE=INNODB; 
ALTER TABLE phpbb_bots ENGINE=INNODB; 
ALTER TABLE phpbb_config ENGINE=INNODB; 
ALTER TABLE phpbb_config_text ENGINE=INNODB; 
ALTER TABLE phpbb_confirm ENGINE=INNODB;
...
  1. Check the Show All checkbox if it is there to see all the rows.
  2. In phpMyAdmin at the bottom of the screen look for a link Copy to clipboard. Click on the link and all the generated SQL will be copied to your clipboard.
  3. Open a text editor and paste it into a new document. Remove any lines before the first ALTER statement. If there are any statements where the table name does not start with the value of $table_prefix, you might want to edit these out because these tables are probably not used by phpBB.
  4. Disable your forum while doing these changes: ACP > General > Board configuration > Board settings > Disable Board > Yes
  5. While you could just paste all these statements into the SQL window in phpMyAdmin again for your database, this is not recommended unless your forum is very small in size. Instead, it’s recommended that you do a block of these at a time, say ten statements per block. If there are no errors, then do the next block until all are done. For very large tables like the phpbb_posts table or the phpbb_search_wordmatch table, it is recommended that you do these individually. Each line that is executed should change the storage engine for the table from MyISAM to InnoDB.
  6. When all done, you can verify that the table storage engines have changed by clicking on the link for the database in phpMyAdmin and examining the TYPE column again. They should all report InnoDB.
  7. Reenable your forum: ACP > General > Board configuration > Board settings > Disable Board > No
  8. You don’t need to save the SQL in your editor.

That’s it! Enjoy!