MyBB Community Forums

Full Version: Problems after upgrade to PHP 8
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi

Forum:
https://www.promo2day.com/

I need help as I have disabled all plugins using the option in general settings in the adminCP then I upgraded PHP from 7.4 to 8

I still receive many errors:

Warning [2] Undefined variable $modlist - Line: 5 - File: inc/functions_forumlist.php(457) : eval()'d code PHP 8.0.23 (Linux)

Warning [2] Undefined variable $unreadreports - Line: 33 - File: global.php(961) : eval()'d code PHP 8.0.23 (Linux)

Undefined variable $myalerts_headericon - Line: 10 - File: global.php(553) : eval()'d code PHP 8.0.23 (Linux)


Warning [2] Undefined variable $welcomeguest - Line: 58 - File: index.php(468) : eval()'d code PHP 8.0.23 (Linux)

Warning [2] Undefined property: MyLanguage::$forum_locked - Line: 70 - File: index.php(468) : eval()'d code PHP 8.0.23 (Linux)

Warning [2] Undefined property: MyLanguage::$forum_locked - Line: 71 - File: index.php(468) : eval()'d code PHP 8.0.23 (Linux)


Warning [2] Undefined variable $dvz_shoutbox - Line: 30 - File: index.php(468) : eval()'d code PHP 8.0.23 (Linux)

Please help how to fix these errors?

Also, re-enable plugins under PHP 8 is not working and gives fatal error that stop adminCP ...It works again after reverting back to PHP 7.4

Screenshot:

[Image: exhLw8o.png]

Any advice how to edit the code manually? Or there will be maintenance release to fix these errors?

PHP 7.4 will be removed from the servers after 2 months
We added a fix for the first error: https://github.com/mybb/mybb/commit/567f...3244e7218f

The rest seem to be caused by plugins and/or themes.
Thanks so much, but the test was done to migrate to PHP8 with all plugins disabled (using general settings option) and default theme. Do I need to uninstall all plugins?
Plugins may add and remove variables to templates automatically during individual (de)activation and (un)installation, depending on how they were programmed.

The Disable All Plugins setting prevents plugins' code from being run without triggering these programmed operations, so more errors may occur while it's set to Yes.

Deactivating or uninstalling plugins individually may help, and any remaining variables that were not present in the original Default theme would probably be related to:
  • plugins that don't remove own variables
  • themes that use additional variables
  • outdated themes (e.g. {$unreadreports} was removed in MyBB 1.8.20, and is no longer present in the header template)
  • manual customizations

Note that Warnings can be hidden from normal output, and simply logged (or ignored completely, depending on error handling settings).
Thanks so much for your help

I have uploaded the modded file and still the same error occurs

[Image: Ep6Fzwq.png]

Also these errors occur:

Warning [2] Undefined variable $welcomeguest - Line: 49 - File: index.php(468) : eval()'d code PHP 8.0.23 (Linux)

Warning [2] Undefined property: MyLanguage::$forumteam - Line: 20 - File: index.php(406) : eval()'d code PHP 8.0.23 (Linux)
Warning [2] Undefined property: MyLanguage::$forum_locked - Line: 61 - File: index.php(468) : eval()'d code PHP 8.0.23 (Linux)
Warning [2] Undefined property: MyLanguage::$forum_locked - Line: 62 - File: index.php(468) : eval()'d code PHP 8.0.23 (Linux)

AdminCP stopped working with error: HTTP ERROR 500
Tarekm Wrote:[Image: Ep6Fzwq.png]

To fix this warnings apply this edit to "inc/functions_forumlist.php": https://github.com/mybb/mybb/commit/567f...3244e7218f



Tarekm Wrote:Warning [2] Undefined variable $welcomeguest - Line: 49 - File: index.php(468) : eval()'d code PHP 8.0.23 (Linux)

Warning [2] Undefined property: MyLanguage::$forumteam - Line: 20 - File: index.php(406) : eval()'d code PHP 8.0.23 (Linux)
Warning [2] Undefined property: MyLanguage::$forum_locked - Line: 61 - File: index.php(468) : eval()'d code PHP 8.0.23 (Linux)
Warning [2] Undefined property: MyLanguage::$forum_locked - Line: 62 - File: index.php(468) : eval()'d code PHP 8.0.23 (Linux)

forum_locked has been renamed to forum_closed you need to replace it in all templates that uses it
$welcomeguest I think it's been added from a plugin you need to enable it.

Anyway these are warnings, for the ACP that throws 500 can you find any error log about it?
Thanks for your reply. I edited the inc/functions_forumlist.php, the same error occurs as I posted above

There is no error logs, just error 500 in ACP after migration to PHP8

Once I revert back yo PHP7.4 , Everything is OK and no errors
Are you using a custom theme for ACP? Try disabling it
Using default theme
For admin CP HTTP Error 500 which occurs only after upgrade to PHP 8:

Server returned:

non js files deprecated"

chromewebdata error index 6789
Pages: 1 2