MyBB Community Forums

Full Version: Errors after upgrading
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear all,

I encounter with several errors:

FIRSTLY
Online page gives error:
Quote:Warning [2] Invalid argument supplied for foreach() - Line: 2974 - File: inc/functions.php PHP 5.2.17 (Linux)
File Line Function
/inc/functions.php 2974 errorHandler->error
/inc/functions_online.php 457 get_unviewable_forums
/inc/functions_online.php 987 build_friendly_wol_location
/online.php 209 build_wol_row
Warning [2] Invalid argument supplied for foreach() - Line: 2974 - File: inc/functions.php PHP 5.2.17 (Linux)

I reinstalled all the files via ftp, but error continues.

SECONDLY
On index page, the forums disappeared, and the threads are all unreachable.

However, I'm sure that all threads and forums are there inside the database. What's the problem and how can I fix it?

I use the default template and theme.

I also see the following errors in the error_log:

Quote: [17-Mar-2013 04:44:04] PHP Fatal error: Call to undefined function my_strpos() in /home/forum/public_html/inc/class_error.php on line 204
[17-Mar-2013 18:49:51] PHP Parse error: syntax error, unexpected $end in /home/forum/public_html/inc/functions.php on line 371
[17-Mar-2013 18:51:56] PHP Warning: Unterminated comment starting line 308 in /home/forum/public_html/inc/functions.php on line 308
[17-Mar-2013 18:51:56] PHP Fatal error: Call to undefined function my_substr() in /home/forum/public_html/inc/init.php on line 188
[17-Mar-2013 18:51:58] PHP Parse error: syntax error, unexpected $end in /home/forum/public_html/inc/functions.php on line 5087
[17-Mar-2013 18:51:58] PHP Parse error: syntax error, unexpected $end, expecting ')' in /home/forum/public_html/inc/functions.php on line 5362
[17-Mar-2013 18:51:58] PHP Parse error: syntax error, unexpected $end, expecting ')' in /home/forum/public_html/inc/functions.php on line 6154
[17-Mar-2013 18:52:02] PHP Fatal error: Call to undefined function get_unviewable_forums() in /home/forum/public_html/inc/functions_online.php on line 457
[17-Mar-2013 18:52:26] PHP Parse error: syntax error, unexpected $end in /home/forum/public_html/inc/functions.php on line 3315
[17-Mar-2013 19:27:08] PHP Warning: Unterminated comment starting line 91 in /home/forum/public_html/inc/db_mysql.php on line 91
[17-Mar-2013 19:27:08] PHP Fatal error: Class 'DB_MySQL' not found in /home/forum/public_html/inc/functions.php on line 181
[17-Mar-2013 19:27:11] PHP Parse error: syntax error, unexpected $end in /home/forum/public_html/inc/functions.php on line 840


In fact, I don't need a solution, I just wonder what might cause these errors and problems.

SOLUTION

The forums and threads on index had disappeared. However, after I changed the charset of the table "mybb_datacache" via the phpmyadmin, the problem was solved. It was latin1_swedish_ci, but now utf8_general_ci.

Quote:ALTER TABLE mybb_datacache DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

The same for the rows "title" and "cache" under the table "mybb_datacache".

However, why does it cause such a problem?