An ultra-stupid phpbb categories hierarchy bug

If you patched your phpbb with the caregories hierarchy mod from Ptirhiik and your phpbb stopped working altogether and exhibits the following sympthoms:

Here is the solution: Delete includes/def_tree.php, touch it (to create a 0 byte version) and chmod/chown it correctly. Wow, your forum works again.

Background: The mod caches authentification data to reduce database load. It does it by generating several arrays that are written as php-code to includes/def_tree.php, which is included inside includes/functions_categories_hierarchy.php. The problem is: this file can be corrupted for various reasons, even if your forum worked flawlessly for years. The mod does not check if the file is valid, it simply includes it. Worse: It includes it with @include to suppress any error messages php might generate. This is why you can’t find any errors in the logs, and why phpbb stops working inside init_userprefs: the mod includes the corrupted def_tree.php, which generates a parse error and causes php to terminate silently, leaving you wondering what happened.

Took me some time to find, after all diagnostic measures failed i installed a debug-extension and stepped line by line thru the phpbb-code until i found the culprit.

hometop