YesNoOk
avatar

Having problems with a parser error. (Read 278 times)

Started by Saohc, June 03, 2010, 12:37:35 am
Share this topic:
Having problems with a parser error.
#1  June 03, 2010, 12:37:35 am
  • ****
  • Working on MGS1 Snake's VR missions in MGS2
    • USA
It seems everytime I try to install a really good mod on my PHPBB3 forum(Hocotate Freight), I get these errors.
"Parse error: syntax error, unexpected T_VARIABLE in /home/luigi/public_html/includes/functions_display.php on line 100
"

I'm trying to fix an error on my phpbb3 forum and i'm having problems..

Here's the code that is apperantly causing the error..

Code:
$branch_root_id = $root_data['forum_id'];

Nothing seems to be wrong, maybe the site doesn't want the modification I'm trying to install?

I did everything the mods' install.xml file told me to.

Can someone help me?
I've tried adding one of these..
;
)
]

and it still is showing the same error!
I attached the file at the bottom for you to look at.
Can someone assist me with this problem? :( I want to get back on my site and have the modification, I installed it correctly..

Would choosing me for the question thread be a
unique experience?  I can't really say.
Re: Having problems with a parser error.
#2  June 03, 2010, 02:00:16 am
  • ***
  • www.virtualltek.com
    • Brazil
    • www.virtualltek.com
It seems that the syntax error is in the previous line, because the error shows that the variable in the line 100 is an unexpected token, ie should not have a variable declaration after the last token of the previous line.
If you post more snippets of the file is easier to help.

[]s
Programming is a Super Power
"With great power comes great responsibility."
Re: Having problems with a parser error.
#3  June 03, 2010, 02:20:34 am
  • ****
  • Working on MGS1 Snake's VR missions in MGS2
    • USA
Well here it is:
Code:
// Display list of active topics for this category?
$show_active = (isset($root_data['forum_flags']) && ($root_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) ? true : false;

$sql_array = array(
'SELECT' => 'f.*',
'FROM' => array(
FORUMS_TABLE => 'f'
),
'LEFT_JOIN' => array(),
);

if ($config['load_db_lastread'] && $user->data['is_registered'])
{
$sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id');
$sql_array['SELECT'] .= ', ft.mark_time';
}
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
{
$tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();

if (!$user->data['is_registered'])
{
$user->data['user_lastmark'] = (isset($tracking_topics['l'])) ? (int) (base_convert($tracking_topics['l'], 36, 10) + $config['board_startdate']) : 0;
}
}

if ($show_active)
{
$sql_array['LEFT_JOIN'][] = array(
'FROM' => array(FORUMS_ACCESS_TABLE => 'fa'),
'ON' => "fa.forum_id = f.forum_id AND fa.session_id = '" . $db->sql_escape($user->session_id) . "'"
);

$sql_array['SELECT'] .= ', fa.user_id';
}
$sql_array['LEFT_JOIN'][] = array(//for NV ALTT
'FROM' => array(TOPICS_TABLE => 't'),
'ON' => "f.forum_last_post_id = t.topic_last_post_id AND t.topic_moved_id = 0"
);
$sql_array['SELECT'] .= ', t.topic_title, t.topic_id, t.topic_last_post_id';

$sql_array['LEFT_JOIN'][] = array(
$result = $db->sql_query($sql))
;
$forum_tracking_info = array()
$branch_root_id = $root_data['forum_id'];

Would choosing me for the question thread be a
unique experience?  I can't really say.
Re: Having problems with a parser error.
#4  June 03, 2010, 03:29:38 am
  • ***
  • www.virtualltek.com
    • Brazil
    • www.virtualltek.com
At the end of the line before the error is missing a ";" to separate the statements. Enjoy!

[]s
Programming is a Super Power
"With great power comes great responsibility."