Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in ***/forums/global.php(500) : eval()'d code on line 2
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in ***/dev/forums/global.php(559) : eval()'d code on line 6
Getting those errors after a successful merge. *** the FTP path for obvious reasons.
Any ideas what the issue is?
We'd need to see the code around those lines; it's nice liking some quotes or something on those lines.
<?php
/**
* MyBB 1.6
* Copyright 2010 MyBB Group, All Rights Reserved
*
* Website: http://mybb.com
* License: http://mybb.com/about/license
*
* $Id: global.php 5016 2010-06-12 00:24:02Z RyanGordon $
*/
$working_dir = dirname(__FILE__);
if(!$working_dir)
{
$working_dir = '.';
}
// Load main MyBB core file which begins all of the magic
require_once $working_dir."/inc/init.php";
$shutdown_queries = array();
// Read the usergroups cache as well as the moderators cache
$groupscache = $cache->read("usergroups");
// If the groups cache doesn't exist, update it and re-read it
if(!is_array($groupscache))
{
$cache->update_usergroups();
$groupscache = $cache->read("usergroups");
}
if(!defined('THIS_SCRIPT'))
{
define('THIS_SCRIPT', '');
}
$current_page = my_strtolower(basename(THIS_SCRIPT));
// Send page headers - don't send no-cache headers for attachment.php
if($current_page != "attachment.php")
{
send_page_headers();
}
That should be enough, lemme know if you need more.
EDIT: eval("\$header = \"".$templates->get("header")."\";");
eval("\$footer = \"".$templates->get("footer")."\";");
I think it's these two that are causing the issues.
EDIT 2:
http://mybbhacks.zingaburga.com/showthread.php?tid=260
For some reason this plugin won't work after the merge, which seems to be causing the issue.
Post the contents of your header and footer templates please.
Header:
<?php include $_SERVER['DOCUMENT_ROOT'].'/includes/header.php'; ?>
<section id="forums">
<header>
<h1>Community</h1>
</header>
<section>
<a name="top" id="top"></a>
{$pm_notice}
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}
{$pending_joinrequests}
<navigation>
Footer:
<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE -->{$task_image}<!-- End task image code -->
{$auto_dst_detection}
</section>
</section>
<?php include $_SERVER['DOCUMENT_ROOT'].'/includes/sidebar.php'; ?>
<?php include $_SERVER['DOCUMENT_ROOT'].'/includes/footer.php'; ?>
<script type="text/javascript">jQuery.noConflict();</script>
Ah, you can't use PHP in templates unless you install the "PHP in templates" plugin.
(2011-02-12, 06:06 PM)euantor Wrote: [ -> ]Ah, you can't use PHP in templates unless you install the "PHP in templates" plugin.
PHP and Template Conditionals --- that one?
If so, it's already installed.
http://mybbhacks.zingaburga.com/showthre...83#pid5583
Turns out this was turned to off, problem fixed.
Yes, not a merge issue either. Whenever there is a problem referencing a core file, it isn't the fault of the merge. Moved to general support just in case someone else runs into it.