MyBB Community Forums

Full Version: Mybb 1.8.22 Board Closing itself
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Good Day,

I upgraded myBB recently from 1.8.8 to 1.8.22. The upgrade process went well and the forum seemed to be working.

The site url:

Recently I noticed that the forum is automatically "closing" itself. 

Im not exactly sure when this is happening as I visit the forum once every 1-3 days and so far I've had to "reopen" it 4 times in the last 2 weeks.

When I go to Configuration->settings->board online/offline to enable the board there is a text box which says:
"MyBB is automatically repairing a crashed table." but im not sure if this is just the generic text.

As a precaution I have accessed the phpmyadmin interface and manually run a repair on all tables, but there were no issues to start with.

How do I debug as im hosted on though a service provider and do not have ssh server access. only basic cpanel and ftp.

Any assistance is appreciated

probably sessions table in the database is filling up & crashing

you can try using task file given here => Link
Thanks. Ive added this script and will monitor.

If anyone can share more information around actual logs that might be available to confirm or understand why the board closes that would be helpful.

Hey Again,

Just navigated to the site now and the board is closed again. So not the sessions table then.

Theres no magical global log I can check for errors?
Do you have any un-reparable database table or any table that crashes so often in your forum database?

The checktables task will close the board before repairing any crashed table and then open it. It might be that repair process failed and your board was never put to open again.
Quote:As a precaution I have accessed the phpmyadmin interface and manually run a repair on all tables, but there were no issues to start with.

If you feel the checktables task is failing you could as well disable it. I'm unsure if this should be recommended but it seems you know well enough how to verify this yourself directly.

(2020-07-17, 06:44 PM)DoC_001 Wrote: [ -> ]Theres no magical global log I can check for errors?

There should be logs for the checktables task once it finishes running, but it seems the script is stopped for you before it does so I won't be surprised you find none.

I had since deactivated the "Tables Check" task that is linked to checktables.php script. The board has not closed since.
So something certainly going wrong in there.

I managed to get hold of the apache error logs and found lines:
PHP Fatal error: Uncaught Error: [] operator not supported for strings in /home/saminaox/public_html/inc/tasks/checktables.php:61

With line 61 refering to: $repaired[] = $table['Table'];

Im running PHP 7.3.20 and apparently since PHP 7.1.0
The empty index operator (e.g. $str[] = $x) is not supported for strings anymore, and throws a fatal error instead of silently converting to array.
So that means that you need to say that it is an array $myString = array();
Prior to PHP 7.1.0 , PHP converted a [] to array() silently, and now not anymore.

I suggest MyBB needs to update line 31 to initialise the array as follows:
i.e. change
$repaired = "";
$repaired = array();
^ Thank You for your suggestion & the analysis.
it will be considered by the developers.
IIRC, so far we haven't noticed this specific issue.

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github:

Thanks for contributing to MyBB!

The MyBB Group
Pages: 1 2