PDA

View Full Version : parse error, unexpected T_IF


hawgjaw
10-13-2005, 12:32 AM
This what I get when I try to get into the admin panel{Parse error: parse error, unexpected T_IF in /home/bedrocks/public_html/forums/admincp/global.php on line 22} the forums are working fine as of now any help would be great, thanks in advance. Im also attaching that part of my global.php file maybe it will help.
{
// identify where we are
define('VB_AREA', 'Forum');

// ################################################## ###########################
// Start initialisation
require_once('./includes/init.php')

// ################################################## ###########################
// Start functions
if (DB_QUERIES)
{
// start functions parse timer
echo "Parsing functions.php\n";
$pageendtime = microtime();
$starttime = explode(' ', $pagestarttime);
$endtime = explode(' ', $pageendtime);
$beforetime = $endtime[0] - $starttime[0] + $endtime[1] - $starttime[1];
echo "Time before: $beforetime\n";
if (function_exists('memory_get_usage'))
{
echo "Memory Before: " . number_format((memory_get_usage() / 1024)) . 'KB' . " \n";
}
}

require_once('./includes/functions.php');

if (DB_QUERIES)
{
// end functions parse timer
$pageendtime = microtime();
$starttime = explode(' ', $pagestarttime);
$endtime = explode(' ', $pageendtime);
$aftertime = $endtime[0] - $starttime[0] + $endtime[1] - $starttime[1];
echo "Time after: $aftertime\n";
echo "Time taken: " . ($aftertime - $beforetime) . "\n";
if (function_exists('memory_get_usage'))
{
echo "Memory After: " . number_format((memory_get_usage() / 1024)) . 'KB' . " \n";
}
echo "\n<hr />\n\n";
}

Adrian Schneider
10-13-2005, 12:40 AM
Could you highlight or reply stating line 22?

hawgjaw
10-13-2005, 12:17 PM
if (DB_QUERIES) That is line 22.

Andreas
10-13-2005, 12:24 PM
Wrong global.php :)

hawgjaw
10-13-2005, 02:08 PM
Ok ill write stupid on my forehead now, that is what was wrong some how I uploaded the wrong global into the admincp, just you saying that made me start looking. Thanks alot solved the problem for me anyways, I guess I wont be doing any mods at night when im tired anymore lol.

Adrian Schneider
10-13-2005, 02:19 PM
Ok ill write stupid on my forehead now, that is what was wrong some how I uploaded the wrong global into the admincp, just you saying that made me start looking. Thanks alot solved the problem for me anyways, I guess I wont be doing any mods at night when im tired anymore lol.

Bahahaha nice "catch" Kirby. :p