September 2023 work summary and a phpBB mystery

Last month I encountered a phpBB mystery which became one of the few instances where I was unable to adequately complete a job for a customer. I could perhaps have completed it if I had enough time but time is money and the client decided it was too much money and too problematic to risk. The board had lain dormant after a failed upgrade seemed to mess it up. I was asked to successfully upgrade it. My upgrade at first seemed successful, but going into the ACP revealed a lot of tabs missing. So a lot of administrator functions could not be selected so you could not do things like install extensions. I tried replacing the phpbb_modules table with rows from a generic install of phpBB, which has worked in the past, but didn’t this time.

phpBB’s permission system was part of the problem because it is needlessly complex. The phpbb_users table has a user_permissions column which is interpreted as a bit string with each bit controlling a particular permission for a user. The user_permissions field is used in a bit matrix of a user’s forum and group permissions to determine the resulting final permission which allows things like tabs to be seen. It seemed likely that somewhere along the way the values in these columns were changed or erased and that was the root of the problem. It only affects administrators. But regenerating the data in the user_permissions column is not documented anywhere except in an auth.php function called build_bitstring, which is hard to read and understand. So it appears there is no way to recover these values except in a backup of the phpbb_users that existed before an upgrade was attempted. Anyhow, after numerous attempts, nothing worked. If you think you can fix the problem I’ll put you in touch with the client so get in touch.

Otherwise client work in September was hardly onerous:

  • Issues trying to login again after logging out on multiple browsers. Could not reproduce. Client paid me for my time.
  • Installed Media Embed extension, version 2.0.1 for a client
  • Upgraded a test board from phpBB 3.3.3 to 3.3.10, 3 extensions were upgraded too. Recommended PHP 8.1 instead of 7.4 which was installed. When all testing is done I’ll get permission to upgrade the actual board.