Forum Moderators: coopster
My admin panel has an error on the left side of it (where the feature list goes)... the error is below:
Parse error: parse error, unexpected T_VARIABLE in /home/vigilant/public_html/board/admin/admin_db_utilities.php on line 702
Here is line 702 in admin/admin_db_utilities.php:
$additional_tables = (isset($HTTP_POST_VARS['additional_tables']))? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables']))? $HTTP_GET_VARS['additional_tables'] : "" );$backup_type = (isset($HTTP_POST_VARS['backup_type']))? $HTTP_POST_VARS['backup_type'] : ( (isset($HTTP_GET_VARS['backup_type']))? $HTTP_GET_VARS['backup_type'] : "" );
Any ideas on how to fix this?
Any help appreciated and needed ASAP!
Thanks.
$additional_tables = (isset($HTTP_POST_VARS['additional_tables']))? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables']))? $HTTP_GET_VARS['additional_tables'] : "" );
$backup_type = (isset($HTTP_POST_VARS['backup_type']))? $HTTP_POST_VARS['backup_type'] : ( (isset($HTTP_GET_VARS['backup_type']))? $HTTP_GET_VARS['backup_type'] : "" );
if ( isset($HTTP_POST_VARS['additional_tables']) )
{
$additional_tables = $HTTP_POST_VARS['additional_tables'];
} elseif ( $HTTP_GET_VARS['additional_tables'] ) {
$additional_tables = $HTTP_GET_VARS['additional_tables']
} else {
$additional_tables = '';
}
Also, I found another mistake while reformatting the code. You(or they?) start out using all single quotes to around strings, then switch to doubles at the very end. That could very well be your error.
Notice the doubles below:
$additional_tables = (isset($HTTP_POST_VARS['additional_tables']))? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables']))? $HTTP_GET_VARS['additional_tables'] : "" );$backup_type = (isset($HTTP_POST_VARS['backup_type']))? $HTTP_POST_VARS['backup_type'] : ( (isset($HTTP_GET_VARS['backup_type']))? $HTTP_GET_VARS['backup_type'] : "" );
what happens with some of these parse errors is a mismatch of () or {} or even a missing ; causes the error to be reported farther down in the code.
It's what we call 'trickle down'. It may even have occured much farther up. Do you have a copy of the file before you added the mod? You could compare the 2 and see where the changes are.
$tables = array(
'auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words', 'confirm');
// Start add - Fully integrated shoutbox MOD
$tables[] = 'shout'
// End add - Fully integrated shoutbox MOD
$additional_tables = (isset($HTTP_POST_VARS['additional_tables']))? $HTTP_POST_VARS['additional_tables'] : ( (isset($HTTP_GET_VARS['additional_tables']))? $HTTP_GET_VARS['additional_tables'] : "" );$backup_type = (isset($HTTP_POST_VARS['backup_type']))? $HTTP_POST_VARS['backup_type'] : ( (isset($HTTP_GET_VARS['backup_type']))? $HTTP_GET_VARS['backup_type'] : "" );
$gzipcompress = (!empty($HTTP_POST_VARS['gzipcompress']))? $HTTP_POST_VARS['gzipcompress'] : ( (!empty($HTTP_GET_VARS['gzipcompress']))? $HTTP_GET_VARS['gzipcompress'] : 0 );
$drop = (!empty($HTTP_POST_VARS['drop']))? intval($HTTP_POST_VARS['drop']) : ( (!empty($HTTP_GET_VARS['drop']))? intval($HTTP_GET_VARS['drop']) : 0 );
Any idea on how to get the following error fixed?...
Parse error: parse error, unexpected T_VARIABLE in /home/vigilant/public_html/board/admin/admin_db_utilities.php on line 702
Remember, this error appears in the left side of my phpBB 2.x admin panel.
Help appreciated-- thanks.
whenever installing mods
keep copies of all changed files before you change anything
always look at the code you added for the mod before anything else
I am guessing that is added code since it says
// Start add - Fully integrated shoutbox MOD
// End add - Fully integrated shoutbox MOD
;)
Thanks!
Details:
Birdman's recent suggestion gives me this error (same place I'm receiving the error for both of your suggestions):
Parse error: parse error, unexpected T_IF in /home/vigilant/public_html/board/admin/admin_db_utilities.php on line 702
jatar_k's suggestion with the ';' gives me this:
Parse error: parse error, unexpected T_DOUBLE_ARROW, expecting ')' in /home/vigilant/public_html/board/admin/admin_board.php on line 200
I'm convinced that jatar_k's suggestion gets me out of the trouble with admin_db_utilities... and moves me on to the other file errors...
What a mess I am in!
But now I face this error...
Parse error: parse error, unexpected T_DOUBLE_ARROW, expecting ')' in /home/vigilant/public_html/board/admin/admin_board.php on line 200
admin/admin_board.php below --- lines 198 through 204:
"L_ENABLE_GZIP" => $lang['Enable_gzip'],
"L_ENABLE_PRUNE" =>// Start add - Fully integrated shoutbox MOD
' L_PRUNE_SHOUTS' => $$lang['Prune_shouts ' ];
' L_PRUNE_SHOUTS_EXPLAIN' => $$lang['Prune_shouts_explain ' ],
// End add - Fully integrated shoutbox MOD
$$lang['Enable_prune ' ],
"L_ALLOW_HTML" => $lang['Allow_HTML'],
Hint: Line 200 is ' L_PRUNE_SHOUTS' => $$lang['Prune_shouts ' ];
Any ideas on how to get me out of this mess?
Thanks!
"L_ENABLE_PRUNE" =>// Start add - Fully integrated shoutbox MOD
' L_PRUNE_SHOUTS' => $$lang['Prune_shouts ' ];
' L_PRUNE_SHOUTS_EXPLAIN' => $$lang['Prune_shouts_explain ' ],
// End add - Fully integrated shoutbox MOD
$$lang['Enable_prune ' ],
"L_ALLOW_HTML" => $lang['Allow_HTML'],
you seem to have pasted it in between a statement, the above should be
"L_ENABLE_PRUNE" =>$$lang['Enable_prune'],
// Start add - Fully integrated shoutbox MOD
' L_PRUNE_SHOUTS' => $$lang['Prune_shouts'];
' L_PRUNE_SHOUTS_EXPLAIN' => $$lang['Prune_shouts_explain'],
// End add - Fully integrated shoutbox MOD
"L_ALLOW_HTML" => $lang['Allow_HTML'],
are you sure those are supposed to $$ and not a single $
that's the funniest post I have read in a while
well, I can only suggest to walk through the installation instructions to see if anything was missed. Don't change anything, just look.
another thing, I don't think these are supposed to be $$ they should probably be single $
"L_ENABLE_PRUNE" =>$$lang['Enable_prune'],
// Start add - Fully integrated shoutbox MOD
' L_PRUNE_SHOUTS' => $$lang['Prune_shouts'];
' L_PRUNE_SHOUTS_EXPLAIN' => $$lang['Prune_shouts_explain'],
// End add - Fully integrated shoutbox MOD
"L_ALLOW_HTML" => $lang['Allow_HTML'],
also, look under the bed, I find all kinds of things there ;)