Whilst performing a local install of php, phpBB and mySQL to test out the forum software, I suddenly got some weird errors whilst posting a test message, along the lines of passing variables by reference. It seems that in the latest incarnation of php, you can't pass functions as parameters where the parameter is a pass-by-reference, which makes sense to me.
However, should you receive these errors, here's the quickfix I did:
root/posting.php
Find this line:
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
it's the str_replace() functions that are causing the issue. Replace the above with:
$tmp1 = str_replace("\'", "''", $username);
$tmp2 = str_replace("\'", "''", $subject);
$tmp3 = str_replace("\'", "''", $message);
$tmp4 = str_replace("\'", "''", $poll_title);
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, $tmp1, $tmp2, $tmp3, $tmp4, $poll_options, $poll_length);
and in:
root/includes/functions_search.psp
Find:
$search_raw_words = array();
$search_raw_words['text'] = split_words($clean_words('post', $post_text, $stopword_array, $synonym_array));
$search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array));
and replace with the above with:
$tmp1 = clean_words('post', $post_text, $stopword_array, $synonym_array);
$tmp2 = clean_words('post', $post_title, $stopword_array, $synonym_array);
$search_raw_words = array();
$search_raw_words['text'] = split_words($tmp1);
$search_raw_words['title'] = split_words($tmp2);
Now, I only had this on the LATEST Php download on my windows machine. The phpbb code I uploaded to the frihost site works just fine, so I bet they fix it before the next release of phpBB.
Sorry if this is a duplicate post.[/b]
However, should you receive these errors, here's the quickfix I did:
root/posting.php
Find this line:
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
it's the str_replace() functions that are causing the issue. Replace the above with:
$tmp1 = str_replace("\'", "''", $username);
$tmp2 = str_replace("\'", "''", $subject);
$tmp3 = str_replace("\'", "''", $message);
$tmp4 = str_replace("\'", "''", $poll_title);
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, $tmp1, $tmp2, $tmp3, $tmp4, $poll_options, $poll_length);
and in:
root/includes/functions_search.psp
Find:
$search_raw_words = array();
$search_raw_words['text'] = split_words($clean_words('post', $post_text, $stopword_array, $synonym_array));
$search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array));
and replace with the above with:
$tmp1 = clean_words('post', $post_text, $stopword_array, $synonym_array);
$tmp2 = clean_words('post', $post_title, $stopword_array, $synonym_array);
$search_raw_words = array();
$search_raw_words['text'] = split_words($tmp1);
$search_raw_words['title'] = split_words($tmp2);
Now, I only had this on the LATEST Php download on my windows machine. The phpbb code I uploaded to the frihost site works just fine, so I bet they fix it before the next release of phpBB.
Sorry if this is a duplicate post.[/b]
