Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
Hudspath
New Member
New Member


Joined: Mar 20, 2005
Posts: 2

PostPosted: Thu Oct 13, 2005 9:11 pm Reply with quote

I get this message when i try to post to my forums

Fatal error: Only variables can be passed by reference in /home/virtual/site8/fst/var/www/html/modules/Forums/posting.php on line 567

Any thoughts,
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Thu Oct 13, 2005 11:31 pm Reply with quote

Please post lines 560 to 570 from posting.php
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Fri Oct 14, 2005 4:30 pm Reply with quote

This is due to the latest versions of PHP 5. phpBB does not support PHP 5, and they have not released an official fix.

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Hudspath
PostPosted: Fri Oct 14, 2005 6:56 pm Reply with quote

break;

case 'delete':
case 'poll_delete':
delete_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id);
break;
}

if ( $error_msg == '' )
{
if ( $mode != 'editpost' )

someone also told me about global something had to be on and it is off
 
Raven
PostPosted: Fri Oct 14, 2005 7:12 pm Reply with quote

They are probably referring to the php.ini setting allow_call_time_pass_reference = On, but that only causes a warning and not a fatal error. Waht version of PHP are you using? Please post your entire modules/Forums/posting.php file using the bbcode [code] syntax
 
TheosEleos
Life Cycles Becoming CPU Cycles


Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Tue Sep 19, 2006 10:52 pm Reply with quote

I'm having this problem too, guys.

I'm using php 5.0.5

My nuke is 7.4. I'm not having any trouble on my 7.6 Raven version.

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website AIM Address ICQ Number
evaders99
PostPosted: Wed Sep 20, 2006 7:37 am Reply with quote

Upgrade with the latest BBToNuke files
 
TheosEleos
PostPosted: Wed Sep 20, 2006 7:43 am Reply with quote

I'm having a hard time finding them.

I'm not as connected to Nuke as I used to be.
 
evaders99
PostPosted: Wed Sep 20, 2006 7:49 am Reply with quote

All at Only registered users can see links on this board! Get registered or login!
 
TheosEleos
PostPosted: Wed Sep 20, 2006 7:54 am Reply with quote

So much for my attachment mod.

I'm not going to have the energy to install that again after upgrading my phpbb this many versions. lol
 
tehravenx
New Member
New Member


Joined: Jan 08, 2007
Posts: 2
Location: Pittsburgh, PA

PostPosted: Mon Jan 08, 2007 6:51 pm Reply with quote

I fixed the issue Smile

PHP 5.0.* whatever version doesn't like functions being called with parameters that aren't already variables.

For example:

Code:


someFunction(anotherFunction("blah!")); // Reference error


But
Code:


$someVariable = anotherFunction("blah");
someFunction($someVariable); // Works just fine!!


In reference to our error, change
Code:


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);


To something like
Code:


$username2 = str_replace("\'", "''", $username);
$subject2 = str_replace("\'", "''", $subject);
$message2 = str_replace("\'", "''", $message);
$poll_title2 = 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, $username2, $subject2, $message2, $poll_title2, $poll_options, $poll_length);

Where you preset the variables, so the function parameters are all variables before-hand.

Don't ask WHY, I just know this works.

READ THE ERROR MESSAGES CAREFULLY!
After fixing this one I received two more errors on functions_search.php. Do the same proceedure and it works. The forum posts do save properly.

Hope this helps everyone!
Please, spread the word. This is a common error.

-Anthony M. Powers
tehraven(at)gmail(dot)com

_________________
Quoth The Raven,
Nevermore 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
evaders99
PostPosted: Mon Jan 08, 2007 10:32 pm Reply with quote

I believe these issues have been fixed in the recent phpBB versions.. at least 2.0.20 or higher.
 
tehravenx
PostPosted: Mon Jan 08, 2007 10:48 pm Reply with quote

Still a good thing to know what that error means relevant to what needs to be done to fix it, Evaders Smile.

-Anthony
crashboomworks.com Only registered users can see links on this board! Get registered or login!
 
evaders99
PostPosted: Tue Jan 09, 2007 12:11 am Reply with quote

Of course, I just wanted people to know to try the phpBB upgrades first Smile
If there's still issues with phpBB and PHP 5, your fixes will certainly help
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

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 ©