MyBB Community Forums
[Pushed] Mybb 1.8.22 Board Closing itself - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Development (https://community.mybb.com/forum-161.html)
+--- Forum: MyBB 1.8 Development (https://community.mybb.com/forum-165.html)
+---- Forum: 1.8 Bugs and Issues (https://community.mybb.com/forum-157.html)
+----- Forum: Pushed (https://community.mybb.com/forum-183.html)
+----- Thread: [Pushed] Mybb 1.8.22 Board Closing itself (/thread-228592.html)

Pages: 1 2


Mybb 1.8.22 Board Closing itself - DoC_001 - 2020-07-15

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: samini.co.za

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

Thanks.


RE: Mybb 1.8.22 Board Closing itself - .m. - 2020-07-15

probably sessions table in the database is filling up & crashing

you can try using task file given here => Link


RE: Mybb 1.8.22 Board Closing itself - DoC_001 - 2020-07-15

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.

Thanks.


RE: Mybb 1.8.22 Board Closing itself - DoC_001 - 2020-07-17

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?


RE: Mybb 1.8.22 Board Closing itself - noyle - 2020-07-19

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.


RE: Mybb 1.8.22 Board Closing itself - Omar G. - 2020-07-19

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.


RE: Mybb 1.8.22 Board Closing itself - DoC_001 - 2020-07-22

Thanks,

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 = "";
to
$repaired = array();


RE: Mybb 1.8.22 Board Closing itself - .m. - 2020-07-22

^ Thank You for your suggestion & the analysis.
it will be considered by the developers.
IIRC, so far we haven't noticed this specific issue.


RE: Mybb 1.8.22 Board Closing itself - Omar G. - 2020-07-22

Ugh, I think you are right.
https://github.com/mybb/mybb/blob/1b25406ba6b6586f060547dc41e7af653f182276/inc/tasks/checktables.php#L31


RE: Mybb 1.8.22 Board Closing itself - Omar G. - 2020-07-22

Hi,

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: https://github.com/mybb/mybb/issues/4133

Thanks for contributing to MyBB!

Regards,
The MyBB Group