MyBB Community Forums

Full Version: MyBB error message (42) preventing access to club members forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Not sure why it chose to bork itself but our forum seems to have stuffed up mid-upgrade.

When trying to access the site we are all greeted by this screen. This prevents any access to the forums, either as a regular user or as admin.
[Image: error-msg.jpg]
The main issue I have is that because I can't log in to the forum, I can't get access to the admin_cp stuff to see if there is a way to fix things or do a rollback.

Is there a way to load back in a pre-borked backup without access to the admin stuff? I still have access to the hosting site control panel so I can see all of the files and directories but I'm a complete database novice that has always just relied on the automated install/update scripts and then done the tweaking from within the fully installed/setup forum.

According to the Softaculous installer, we're running MyBB v1.8.19 with minor and major auto-upgrades enabled.

The error message generated in the error log is:
[14-Jan-2023 11:17:59 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/z27warp/public_html/warp-forums/install/resources/upgrade0.php' (include_path='.:/opt/cpanel/ea-php73/root/usr/share/pear') in /home/z27warp/public_html/warp-forums/install/upgrade.php on line 350

So, is there a way to roll back to the pre-update attempt? Or do I need to find a way to plough on through the failed update? Do I need to provide more information to help gain a solution? Very worst case, is there a way to import our old forum into v2.x of MyBB? I'd hate to lose almost a decade's worth of posts.

Any and all offers of help are gladly accepted and thanks in advance.
You need to run the upgrade script. Go to yoursite.com/install/upgrade.php and run through the steps.

Using Softaculous is usually a bad idea as things like this can break. I don’t know why it’s trying to load upgrade0.php for example, I’m not sure how they even run automatic upgrades. But see what running the upgrade script does.

Also 1.8.19 came out in September 2018 so it hasn’t been doing a very good job of keeping you auto-updated.
(2023-01-30, 10:24 PM)Matt Wrote: [ -> ]You need to run the upgrade script. Go to yoursite.com/install/upgrade.php and run through the steps.

Using Softaculous is usually a bad idea as things like this can break. I don’t know why it’s trying to load upgrade0.php for example, I’m not sure how they even run automatic upgrades. But see what running the upgrade script does.

Also 1.8.19 came out in September 2018 so it hasn’t been doing a very good job of keeping you auto-updated.

Hi Matt,

Thanks for the quick response.

I feel a little dense here - as I said, database novice. I can see the upgrade.php file via the hosting control panel but it doesn't give me the option to run anything. I can open the file up and view it but that's all. When you say "run through the steps" do you mean edit the file and add our site-specific info?

As to Softaculous, that's down to me not knowing any better and assuming my hosting company knew what it was doing and offered the best tools for the job. I suspect they just went for something quick and easy instead.

Regarding upgrade0.php, I can't see it but there is a sub-directory in the install directory called 'resources' and this has upgrade1.php through to upgrade56.php all dated January 1st 2023.

I'm getting this sinking feeling that if I can't do a rollback to when it was actually working (Jan 14th) then I suspect we're scuppered.
No, you don’t need to edit anything in the files, you will need to visit it in your browser. If you go to yoursite.com/install/upgrade.php you will be able to log in to the upgrader and run through the steps. It will be explained on the upgrade page, you’ll need to select your old version and then hit Next a few times.

You shouldn’t need to do a rollback, nothing has gone wrong, it’s just the upgrade script hasn’t been run yet so it’s outputting that message.
(2023-01-31, 12:22 AM)Matt Wrote: [ -> ]No, you don’t need to edit anything in the files, you will need to visit it in your browser. If you go to yoursite.com/install/upgrade.php you will be able to log in to the upgrader and run through the steps. It will be explained on the upgrade page, you’ll need to select your old version and then hit Next a few times.

You shouldn’t need to do a rollback, nothing has gone wrong, it’s just the upgrade script hasn’t been run yet so it’s outputting that message.

Thanks for the simple-speak directions Matt.

I successfully ran the script and went all through the prompts with it finally telling me I had upgraded from the old version to 1.8.3. However, when trying to view the forum I get the following message.
[Image: Error-msg2.jpg]
At least I now have access to the admin_cp section so I'm guessing this is a good bit of progress.
In your hosting control panel you should have something called phpMyAdmin installed, if you open this and select your database (should be a list on the left), then along the top there will be a tab called Query or SQL (can’t remember), click that and you’ll see a text area, paste this in and submit:

REPAIR TABLE mybb_sessions;
(2023-01-31, 12:52 AM)Matt Wrote: [ -> ]In your hosting control panel you should have something called phpMyAdmin installed, if you open this and select your database (should be a list on the left), then along the top there will be a tab called Query or SQL (can’t remember), click that and you’ll see a text area, paste this in and submit:

REPAIR TABLE mybb_sessions;

Matt, you are an absolute star!

I now have the forums back up and running (at least as far as I can tell) so thank you for all of your assistance and patience. It really is very appreciated.
No problem at all, glad it’s back up and running Smile