MyBB Community Forums

Full Version: 1.6.3 Upgrade Issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I am just now getting to my upgrade and I attempted to do the upgrade. I think my first problem started when I got to the upgrade wizard and it told me I was upgrading from 1.6 to 1.6.1 instead of 1.6.3. I followed through went into my Admin CP and it told me my version was out of date. So I ran the update again and this time I am not able to complete the update because I get an error:

[Image: 22ibu8.jpg]

Now I can't get do anything and I have no clue how to reverse this. I know I need to spend more time with this board but I feel like I am clueless and that's cause I am. Can someone point me in the right directon in getting this fixed?

Thanks in advance.
Basically, It looks like you are missing the end bracket.

Go to your root folder of your website. Then Click on forums. Then Click on Install. Then Click on Resources. Then edit output.php. Find this:

	function print_error($message)
	{
		global $lang;
		if(!$this->doneheader)
		{
			$this->print_header($lang->error, "", 0, 1);
		}
		echo "			<div class=\"error\">\n				";
		echo "<h3>".$lang->error."</h3>";
		$this->print_contents($message);
		echo "\n			</div>";
		$this->print_footer();
	}

& look if you have } after this line:

$this->print_footer();

If not, then add one like the one I have above.

If it still didn't work, then copy & paste this new output.php
<?php
/**
 * MyBB 1.6
 * Copyright 2010 MyBB Group, All Rights Reserved
 *
 * Website: http://mybb.com
 * License: http://mybb.com/about/license
 *
 * $Id: output.php 5440 2011-04-15 10:18:35Z Tomm $
 */

class installerOutput {
	
	public $doneheader;
	public $openedform;
	public $script = "index.php";
	public $steps = array();
	public $title = "MyBB Installation Wizard";

	function print_header($title="Welcome", $image="welcome", $form=1, $error=0)
	{
		global $mybb, $lang;
		
		if($lang->title)
		{
			$this->title = $lang->title;
		}

		@header("Content-type: text/html; charset=utf-8");

		$this->doneheader = 1;
		if($image == "dbconfig")
		{
			$dbconfig_add = "<script type=\"text/javascript\">document.write('<style type=\"text/css\">.db_type { display: none; }</style>');</script>";
		}
		echo <<<END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>$this->title &gt; $title</title>
	<link rel="stylesheet" href="stylesheet.css" type="text/css" />
	<script type="text/javascript" src="../jscripts/prototype.js"></script>
	<script type="text/javascript" src="../jscripts/general.js"></script>
	{$dbconfig_add}
</head>
<body>
END;
		if($form)
		{
			echo "\n	<form method=\"post\" action=\"".$this->script."\">\n";
			$this->openedform = 1;
		}
		
		echo <<<END
		<div id="container">
		<div id="logo">
			<h1><span class="invisible">MyBB</span></h1>
		</div>
		<div id="inner_container">
		<div id="header">$this->title</div>
END;
		if(empty($this->steps))
		{
			$this->steps = array();
		}
		if(is_array($this->steps))
		{
		echo "\n		<div id=\"progress\">";
				echo "\n			<ul>\n";
				foreach($this->steps as $action => $step)
				{
					if($action == $mybb->input['action'])
					{
						echo "				<li class=\"active\"><strong>$step</strong></li>\n";
					}
					else
					{
						echo "				<li>$step</li>\n";
					}
				}
				echo "			</ul>";
		echo "\n		</div>";
		echo "\n		<div id=\"content\">\n";
		}
		else
		{
		echo "\n		<div id=\"progress_error\"></div>";
		echo "\n		<div id=\"content_error\">\n";
		}
		if($title != "")
		{
		echo <<<END
			<h2 class="$image">$title</h2>\n
END;
		}
	}

	function print_contents($contents)
	{
		echo $contents;
	}

	function print_error($message)
	{
		global $lang;
		if(!$this->doneheader)
		{
			$this->print_header($lang->error, "", 0, 1);
		}
		echo "			<div class=\"error\">\n				";
		echo "<h3>".$lang->error."</h3>";
		$this->print_contents($message);
		echo "\n			</div>";
		$this->print_footer();
	}


	function print_footer($nextact="")
	{
		global $lang, $footer_extra;
		if($nextact && $this->openedform)
		{
			echo "\n			<input type=\"hidden\" name=\"action\" value=\"$nextact\" />";
			echo "\n				<div id=\"next_button\"><input type=\"submit\" class=\"submit_button\" value=\"".$lang->next." &raquo;\" /></div><br style=\"clear: both;\" />\n";
			$formend = "</form>";
		}
		else
		{
			$formend = "";
		}

		echo <<<END
		</div>
		<div id="footer">
END;

		$copyyear = date('Y');
		echo <<<END
			<div id="copyright">
				MyBB &copy; 2002-$copyyear MyBB Group
			</div>
		</div>
		</div>
		</div>
		$formend
		$footer_extra
</body>
</html>
END;
		exit;
	}
}
?>

& Save it. That should solve the problem.
Are you sure you uploaded the files for 1.6.3? If you uploaded the files for 1.6.3 then thats what it will be upgraded to.

I would suggest you re-upload all the files from a fresh download of 1.6.3 from here and run the upgrade.
(2011-05-18, 04:14 AM)XxSky DreamerxX Wrote: [ -> ]Basically, It looks like you are missing the end bracket.

Go to your root folder of your website. Then Click on forums. Then Click on Install. Then Click on Resources. Then edit output.php. Find this:

	function print_error($message)
	{
		global $lang;
		if(!$this->doneheader)
		{
			$this->print_header($lang->error, "", 0, 1);
		}
		echo "			<div class=\"error\">\n				";
		echo "<h3>".$lang->error."</h3>";
		$this->print_contents($message);
		echo "\n			</div>";
		$this->print_footer();
	}

& look if you have } after this line:

$this->print_footer();

If not, then add one like the one I have above.

If it still didn't work, then copy & paste this new output.php
<?php
/**
 * MyBB 1.6
 * Copyright 2010 MyBB Group, All Rights Reserved
 *
 * Website: http://mybb.com
 * License: http://mybb.com/about/license
 *
 * $Id: output.php 5440 2011-04-15 10:18:35Z Tomm $
 */

class installerOutput {
	
	public $doneheader;
	public $openedform;
	public $script = "index.php";
	public $steps = array();
	public $title = "MyBB Installation Wizard";

	function print_header($title="Welcome", $image="welcome", $form=1, $error=0)
	{
		global $mybb, $lang;
		
		if($lang->title)
		{
			$this->title = $lang->title;
		}

		@header("Content-type: text/html; charset=utf-8");

		$this->doneheader = 1;
		if($image == "dbconfig")
		{
			$dbconfig_add = "<script type=\"text/javascript\">document.write('<style type=\"text/css\">.db_type { display: none; }</style>');</script>";
		}
		echo <<<END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>$this->title &gt; $title</title>
	<link rel="stylesheet" href="stylesheet.css" type="text/css" />
	<script type="text/javascript" src="../jscripts/prototype.js"></script>
	<script type="text/javascript" src="../jscripts/general.js"></script>
	{$dbconfig_add}
</head>
<body>
END;
		if($form)
		{
			echo "\n	<form method=\"post\" action=\"".$this->script."\">\n";
			$this->openedform = 1;
		}
		
		echo <<<END
		<div id="container">
		<div id="logo">
			<h1><span class="invisible">MyBB</span></h1>
		</div>
		<div id="inner_container">
		<div id="header">$this->title</div>
END;
		if(empty($this->steps))
		{
			$this->steps = array();
		}
		if(is_array($this->steps))
		{
		echo "\n		<div id=\"progress\">";
				echo "\n			<ul>\n";
				foreach($this->steps as $action => $step)
				{
					if($action == $mybb->input['action'])
					{
						echo "				<li class=\"active\"><strong>$step</strong></li>\n";
					}
					else
					{
						echo "				<li>$step</li>\n";
					}
				}
				echo "			</ul>";
		echo "\n		</div>";
		echo "\n		<div id=\"content\">\n";
		}
		else
		{
		echo "\n		<div id=\"progress_error\"></div>";
		echo "\n		<div id=\"content_error\">\n";
		}
		if($title != "")
		{
		echo <<<END
			<h2 class="$image">$title</h2>\n
END;
		}
	}

	function print_contents($contents)
	{
		echo $contents;
	}

	function print_error($message)
	{
		global $lang;
		if(!$this->doneheader)
		{
			$this->print_header($lang->error, "", 0, 1);
		}
		echo "			<div class=\"error\">\n				";
		echo "<h3>".$lang->error."</h3>";
		$this->print_contents($message);
		echo "\n			</div>";
		$this->print_footer();
	}


	function print_footer($nextact="")
	{
		global $lang, $footer_extra;
		if($nextact && $this->openedform)
		{
			echo "\n			<input type=\"hidden\" name=\"action\" value=\"$nextact\" />";
			echo "\n				<div id=\"next_button\"><input type=\"submit\" class=\"submit_button\" value=\"".$lang->next." &raquo;\" /></div><br style=\"clear: both;\" />\n";
			$formend = "</form>";
		}
		else
		{
			$formend = "";
		}

		echo <<<END
		</div>
		<div id="footer">
END;

		$copyyear = date('Y');
		echo <<<END
			<div id="copyright">
				MyBB &copy; 2002-$copyyear MyBB Group
			</div>
		</div>
		</div>
		</div>
		$formend
		$footer_extra
</body>
</html>
END;
		exit;
	}
}
?>

& Save it. That should solve the problem.


I gave up last night but I will do what you suggested as soon as I get home. I pray this works.

Thank you for taking the time to offer a response, I really appreciate that.

(2011-05-18, 06:19 AM)- G33K - Wrote: [ -> ]Are you sure you uploaded the files for 1.6.3? If you uploaded the files for 1.6.3 then thats what it will be upgraded to.

I would suggest you re-upload all the files from a fresh download of 1.6.3 from here and run the upgrade.

I downloaded the files 4 seperate times directly from this site and each time the upgrade wizard ran it told me the upgrade was for 1.6.1. I have no clue what's going on.

1). Deactivate all plugin and note down all plugins you are using, if you can do that and if you are using other than mybb default theme than use default mybb theme now and follow below steps,

2). Backup your database with help of phpmyadmin.

3). download "/inc/config.php" and "/inc/settings.php" only for reference.. and not for upload..

4). Delete everything from your root.

5). Now as you have backup of your database in your system so now you can delete all tables from host through phpmyadmin.

6). Upload MYBB 1.6.3 to your forum folder.

7). Install it. Make sure, your table name is same as the old one, otherwise work will increase more.

8). Upload the all plugins that you were using.

9). Now if your database table prefix is same as per your old, one.. upload the backup database file.

10). And get everything working.Smile

If you have any error or doubt in any step, reply here, and you will get answer.

*Note:- The only problem you will get is while uploading database of "tabeprefix_users" uid=1, as it is already there...so what you can do is.. cut the insert into table ".tableprefix_users" of uid=1 from backup file and paste in notepad to edit the user mannually later on...and rest upload it as it is.
Grave - thank you so much for your detailed response. I really appreciate it. I will inform you all tonight how the update goes.
(2011-05-18, 06:31 PM)dcinnamon Wrote: [ -> ]Grave - thank you so much for your detailed response. I really appreciate it. I will inform you all tonight how the update goes.

no problem, get your site working Smile
(2011-05-18, 03:25 PM)dcinnamon Wrote: [ -> ]I downloaded the files 4 seperate times directly from this site and each time the upgrade wizard ran it told me the upgrade was for 1.6.1. I have no clue what's going on.

Then you wouldn't have been uploading the new files correctly. The version number come directly from ./inc/class_core.php and this file only, so if it was still saying 1.6.1, this file was still saying 1.6.1, thus it had not been updated. You are uploading the new files so they overwrite the old ones, right...??
(2011-05-18, 07:51 PM)MattRogowski Wrote: [ -> ]
(2011-05-18, 03:25 PM)dcinnamon Wrote: [ -> ]I downloaded the files 4 seperate times directly from this site and each time the upgrade wizard ran it told me the upgrade was for 1.6.1. I have no clue what's going on.

Then you wouldn't have been uploading the new files correctly. The version number come directly from ./inc/class_core.php and this file only, so if it was still saying 1.6.1, this file was still saying 1.6.1, thus it had not been updated. You are uploading the new files so they overwrite the old ones, right...??


Yes I was uploading the files to overwrite the previous files. Again, I am not sure what went wrong, I didn't have this issue when I did my last update but this one seems to not be working for me. I am about to try the suggestions given and see what happens.

grave - THANK YOU SO MUCH!! OMG!! I tried the first suggestion and still had the problem so I followed your steps and not only did it work but I ended up getting the correct upgrade. Again, thank you so much for your assistance.

I appreciate everyone who took the time to help me with this. I have a long way to go to get to your level of comfort with this forum stuff but I am determined. Again, thank you all.