phpBB upgrade 3.0.9 to 3.3 – 500 http errors fixed

I recently tried to upgrade a 4 year old phpBB forum to the latest version (3.3).

First: there is a lot of talk when you move from 3.0.x to 3.1/3.2. You need to download the support toolkit to clean up the existing board software because of major updates. So be sure the read those guidelines. For me this wasn’t an issue because my phpBB installation was one without any MODifications, special skins or additional language packs. I ran the support toolkit on my board anyway, but it didn’t do anything… So I skipped this part.

I took a shot at jumping from 3.0.9 straight ahead to the 3.3 installation, following the guide Upgrade from 3.0 to 3.2.

At step 12 problems started to occur when updating the database. The update program stopped multiple times at different stages. I solved this by deleting the install and production directory in the cache folder and running the update process again, and again, … and again, until it reached 100%.

At first glance the board seemed to function right away. But when browsing around, many 500 http errors were thrown. I tried deleting browser cache, removing production directory (cache folder) again, and again… but the problem persisted. I was unable to access the administration control area, etc…

I decided to take a look at the php error log and the one thing that kept popping up was:

Got error ‘PHP message: PHP Fatal error: Uncaught phpbb\exception\http_exception: Failure while aqcuiring locks. in /***/***/***/***/phpbb/lock/flock.php:106

When you have a look on the community board at phpBB customers from hosting company ‘STRATO’ run into the same problems. However, I’m not on STRATO hosting and from what I know my hosting also has a different setup.

The solution to fix is offered by IMC_ger: find in the file phpbb/lock/flock.php line 104.


if (!@flock($this->lock_fp, LOCK_EX))

And replace:

if (!@flock($this->lock_fp, $mode == 'wb' ? LOCK_EX : LOCK_SH))

All 500 errors are gone now and the phpBB is fully operational.