Officially, phpBB 2 (as of this writing, up to version 2.0.17) is not supporting PHP 5. If you install PHP 5, and use it to run phpBB, you will encounter the following symptoms and errors:

  • You cannot post message – When you want to post new topic or reply to a topic, after writing your message, when you click “Submit”, a blank page or screen or error message is shown with address bar showing posting.php, instead of posting confirmation message.
  • You unable to search – When you want to search by clicking oh “Search”, no search results are been returned, or a black page or screen, or error message is shown.

To enable PHP 5 to work properly with phpBB, some changes to the phpBB source code needs to be done. Just follow steps as below:

OPEN
admin/admin_ug_auth.php

FIND
if( $forum_access[$i][$auth_field] == AUTH_ACL && isset($change_acl_list[$forum_id][$auth_field]) )

REPLACE WITH
if( $forum_access[$i][$auth_field] == AUTH_ACL && isset($change_acl_list[$forum_id]) )

FIND
( !isset($auth_access[$forum_id][$auth_field]) && !empty($change_acl_list[$forum_id][$auth_field]) ) ) ||

REPLACE WITH
( !isset($auth_access[$forum_id][$auth_field]) && empty($change_acl_list[$forum_id][$auth_field]) ) ) ||

Finally, some changes are needed so that functions that get called with functions as parameters are not called ‘by reference’ with functions:

OPEN
includes/functions_post.php

FIND
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length)

REPLACE WITH
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length)

OPEN
includes/functions_search.php

FIND
function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)

REPLACE WITH
function clean_words($mode, $entry, &$stopword_list, &$synonym_list)

FIND
function split_words(&$entry, $mode = ‘post’)

REPLACE WITH
function split_words($entry, $mode = ‘post’)

For the above, the changes involved are some parameters have been stripped off the “&” sign.