Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6
Author Message
tina
Regular
Regular



Joined: Aug 15, 2006
Posts: 66

PostPosted: Fri Aug 25, 2006 7:49 pm Reply with quote

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
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Fri Aug 25, 2006 7:59 pm Reply with quote

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.
 
View user's profile Send private message
tina







PostPosted: Fri Aug 25, 2006 9:05 pm Reply with quote

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







PostPosted: Sat Aug 26, 2006 4:56 am Reply with quote

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

PostPosted: Mon Aug 28, 2006 11:11 am Reply with quote

I believe this is already fixed in the later BBToNuke's - let us know if not

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
tina







PostPosted: Wed Nov 08, 2006 2:42 am Reply with quote

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







PostPosted: Wed Nov 08, 2006 3:11 am Reply with quote

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







PostPosted: Wed Nov 08, 2006 3:29 am Reply with quote

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







PostPosted: Wed Nov 08, 2006 4:41 am Reply with quote

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







PostPosted: Wed Nov 08, 2006 7:55 am Reply with quote

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







PostPosted: Sat Nov 25, 2006 7:31 pm Reply with quote

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.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©