Author |
Message |
Hudspath
New Member


Joined: Mar 20, 2005
Posts: 2
|
Posted:
Thu Oct 13, 2005 9:11 pm |
|
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, |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Oct 13, 2005 11:31 pm |
|
Please post lines 560 to 570 from posting.php |
|
|
|
 |
evaders99
Former Moderator in Good Standing

Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Fri Oct 14, 2005 4:30 pm |
|
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! |
|
|
 |
Hudspath

|
Posted:
Fri Oct 14, 2005 6:56 pm |
|
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

|
Posted:
Fri Oct 14, 2005 7:12 pm |
|
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
|
Posted:
Tue Sep 19, 2006 10:52 pm |
|
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! |
|
 |
 |
evaders99

|
Posted:
Wed Sep 20, 2006 7:37 am |
|
Upgrade with the latest BBToNuke files |
|
|
|
 |
TheosEleos

|
Posted:
Wed Sep 20, 2006 7:43 am |
|
I'm having a hard time finding them.
I'm not as connected to Nuke as I used to be. |
|
|
|
 |
evaders99

|
Posted:
Wed Sep 20, 2006 7:49 am |
|
|
|
 |
TheosEleos

|
Posted:
Wed Sep 20, 2006 7:54 am |
|
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


Joined: Jan 08, 2007
Posts: 2
Location: Pittsburgh, PA
|
Posted:
Mon Jan 08, 2007 6:51 pm |
|
I fixed the issue
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 |
|
|
 |
evaders99

|
Posted:
Mon Jan 08, 2007 10:32 pm |
|
I believe these issues have been fixed in the recent phpBB versions.. at least 2.0.20 or higher. |
|
|
|
 |
tehravenx

|
Posted:
Mon Jan 08, 2007 10:48 pm |
|
Still a good thing to know what that error means relevant to what needs to be done to fix it, Evaders .
-Anthony
crashboomworks.com
tehraven@gmail.com |
|
|
|
 |
evaders99

|
Posted:
Tue Jan 09, 2007 12:11 am |
|
Of course, I just wanted people to know to try the phpBB upgrades first
If there's still issues with phpBB and PHP 5, your fixes will certainly help |
|
|
|
 |
|