Author |
Message |
tina
Regular
Joined: Aug 15, 2006
Posts: 66
|
Posted:
Fri Aug 25, 2006 7:49 pm |
|
PHP Nuke 7.6 Patched 3.2 with NukeSentinel 2.5.02
I have another problem. No one can post on the forums. When attempting to do so, this error message appears:
Fatal error: Only variables can be passed by reference in /home/jacmuspr/public_html/modules/Forums/posting.php on line 567 |
|
|
|
|
hitwalker
Sells PC To Pay For Divorce
Joined:
Posts: 5661
|
Posted:
Fri Aug 25, 2006 7:59 pm |
|
i found this....
[ Only registered users can see links on this board! Get registered or login! ]
it should solve it and has probably to do with new php5. |
|
|
|
|
tina
|
Posted:
Fri Aug 25, 2006 9:05 pm |
|
Thanking you for that.
I had to edit three files in the end, posting.php, search.php and then include/functions_search.php. There is a small error in the code in that link so I thought I would post my edits here with correct code.
modules/Forums/Posting.php
Find
Code:$topic_type = ( $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type;
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);
|
Replace
Code:$topic_type = ( $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type;
$temp1=str_replace("\'", "''", $username);
$temp2= str_replace("\'", "''", $subject);
$temp3=str_replace("\'", "''", $message);
$temp4= 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, $temp1, $temp2, $temp3, $temp4, $poll_options, $poll_length);
|
Then in modules/Forums/search.php
Find
Code:$split_search = ( !strstr($multibyte_charset, $lang['ENCODING']) ) ? split_words(clean_words('search', stripslashes($search_keywords), $stopword_array, $synonym_array), 'search') : split(' ', $search_keywords);
|
Replace
Code:if (!strstr($multibyte_charset, $lang['ENCODING']))
{
$temp1 = stripslashes($search_keywords);
$temp2 = clean_words('search', $temp1, $stopword_array, $synonym_array); $split_search = split_words($temp2, 'search');
}
else
$split_search = split(' ', $search_keywords);
|
Then in includes/functions_search.php
Find
Code: $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));
@set_time_limit(0);
|
Replace with
Code:$search_raw_words = array();
$tempA= clean_words('post', $post_text, $stopword_array, $synonym_array);
$search_raw_words['text'] = split_words($tempA);
$tempB= clean_words('post', $post_title, $stopword_array, $synonym_array);
$search_raw_words['title'] = split_words($tempB);
@set_time_limit(0);
|
I also read somewhere that the bbtonuke upgrades (I think it was 20.18) fixes this as well. |
|
|
|
|
hitwalker
|
Posted:
Sat Aug 26, 2006 4:56 am |
|
yes indeed,its important to keep your forums updated...
getting the error is one of the reasons,forums weren't uptodate. |
|
|
|
|
evaders99
Former Moderator in Good Standing
Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Mon Aug 28, 2006 11:11 am |
|
|
|
|
tina
|
Posted:
Wed Nov 08, 2006 2:42 am |
|
I just upgraded the BBToNuke all the way to version 21 and.... I now have the posting problem back (Started right after I did the first upgrade from 10-11). Its just going to a white page when I click on new post. I'm hoping the same fix I did before will work, however you asked me to let you know if it was fixed and it doesn't appear to be. |
|
|
|
|
tina
|
Posted:
Wed Nov 08, 2006 3:11 am |
|
Well, I'm lost.
The code appear's fine. But I now have the same problem and no fix except to go back to my back up, which defeats the purpose of upgrading. |
|
|
|
|
tina
|
Posted:
Wed Nov 08, 2006 3:29 am |
|
Also while the code in the posting.php was fine. The two second lot of changes had not been made.
Even with those changed, its still not posting. |
|
|
|
|
tina
|
Posted:
Wed Nov 08, 2006 4:41 am |
|
I decided to "compare" the files and when comparing includes\functions_search with the new upgraded version and the version I had been running I discovered this difference:
Compare: (<)C:\Documents and Settings\Administrator\Desktop\Document.txt (24197 bytes)
with: (>)C:\Documents and Settings\Administrator\Local Settings\Temp\DSP7B.php (23628 bytes)
Code:155,158c155,157
< $tempA= clean_words('post', $post_text, $stopword_array, $synonym_array);
< $search_raw_words['text'] = split_words($tempA);
< $tempB= clean_words('post', $post_title, $stopword_array, $synonym_array);
< $search_raw_words['title'] = split_words($tempB);
---
> $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));
> @set_time_limit(0);
|
So I reinstalled my old functions_search.php since I had manually made these changes previously and it now works. |
|
|
|
|
evaders99
|
Posted:
Wed Nov 08, 2006 7:55 am |
|
Weird I don't see why that would cause errors. Esp since split_words and clean_words are both should be defined in that file
Any error messages in your error logs? |
|
|
|
|
tina
|
Posted:
Sat Nov 25, 2006 7:31 pm |
|
I've just installed another site with a fresh version of PHP Nuke 7.6 patched 3.1 with Sentinal (latest) downloaded from Ravenphpscrips and I've had the same problem with the forums after upgrading to the lastes (21 ?) and the same fix above worked.
What I think it is is the apache server where my sites are now hosted, is configured to pick up particular code that is used by hackers to access the sql database. And its reading this code or similar in the forum file and the weblinks module (which keeps getting a 4.06 any time a user submits a link) and hence I'm having difficulties with installation. At least that's what my host said about the weblinks module error and I would link to think the issues are somehow related with the configuration of the apache server at my host's end. |
|
|
|
|
|