MyBB Community Forums

Full Version: Update from 1.8.33 to 1.8.34 failed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
On attempts to run the install upgrade.php, a stream of errors such as:

Warning [2] unserialize() expects exactly 1 parameter, 2 given - Line: 138 - File: inc/class_datacache.php PHP 5.6.40 (Linux)
/inc/class_error.php           153         errorHandler->error
                                         [PHP]      errorHandler->error_callback
/inc/class_datacache.php  138      unserialize
/install/upgrade.php          141 datacache->cache

At the very end of all the errors returned, it prompts for username & password but does not accept either, just returns to this screen full of errors.

My website is running PHP 5.6.40 - is this the problem?
Please can you let me know what I have done incorrectly?
Try setting $settings['errortypemedium'] to none in inc/settings.php:
$settings['errortypemedium'] = "none";

This is the Server and Optimization Options → Error Type Medium setting, and should hide warnings from being displayed (recommended). Displaying these warnings may cause the login feature to break.
OK, done but now it states:

Error
You do not have permissions to run this process. You need administrator permissions to be able to run the upgrade procedure.

If you need to logout, please click here. From there you will be able to log in again under your administrator account.


As I cannot access the control panel as the /install directory exists, is ther a way I can confirm I am entering in the right administrative details?  I am SURE I am though...

Is it because I am on PHP 5.6.40 ?
If you temporarily rename/delete the install/ directory, you should be able to use the board.

I don't believe PHP version would affect this, but you may as well switch to a more recent version if you can.
Done successfully, but when I try to access the control panel to check usernames/passwords, it returns:

MyBB Internal Error
MyBB has experienced an internal error and cannot continue.

Error Type:
MyBB Error (42)
Error Message:
Your board has not yet been upgraded. Please do so before attempting to browse it.
If you're a visitor of this website, please wait a few minutes and try again. If this problem persists, please contact the site owner.

If you are the site owner, please check the MyBB Documentation for help resolving common issues, or get technical help on the MyBB Community Forums.

As I said though, I really do believe I am entering the correct administration account when running the upgrade.php, but it will not give me upgrade privaledges for some reason.
From a brief look, there may be edge cases like administrator permissions stemming from the configuration file only (user ID in $config['super_admins']), as the check relies on the account's user group.

If the board is accessible, the ACP should be as well, so there may be some caching issues.
Nope, the board is not accessible and the ACP is not either.  It just states it is "being updated" so I will try to  regress back to the state it was in last night.  

Before I retry to upgrade, is this occurring because of my PHP version 5.6.40 or should I retry?
I faced the exact same problem, see my thread (https://community.mybb.com/thread-238332.html). I guess it's PHP 5.6 related.
Try reverting the inc/class_datacache.php file to the previous version (available at https://raw.githubusercontent.com/mybb/m...acache.php).

The issues may indeed originate in old PHP versions (and PHP >= 7.0 would not be affected).
Yep, it seems from the changelog in the unserialize() manual page as archived on 22 April, 2021 that the second parameter, $options, was added only in PHP version 7.0.0. Oddly, that changelog entry seems to have been removed from the manual page the following day, and no longer appears in the current version.
Pages: 1 2