MyBB Community Forums

Full Version: Mybb 1.8 not compatible with PHP7.0-FPM?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I've upgraded today to PHP 7.0 generally, including PHP 7 FPM, phpinfo of MyBB shows it, too, but when I tried to upgrade to MyBB 1.8.11, it gave me a blank 'Building Data Cache' page, which errored in NGINX (Forum now says its 1.8.11 though..), and when I try to do certain things on the forum, it also errors there, like visiting a persons profile (note, I use Steam-Login).

Error messages:

When visiting a profile -


2017/04/14 00:27:58 [error] 31606#0: *196 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function bcsub() in /var/www/wtcweb/main/inc/class_steam.php:102
Stack trace:
#0 /var/www/wtcweb/main/inc/plugins/steamlogin.php(522): steam->convert64to32('765611981442975...')
#1 /var/www/wtcweb/main/inc/class_plugins.php(139): steamify_user_profile('')
#2 /var/www/wtcweb/main/member.php(1944): pluginSystem->run_hooks(Array)
#3 {main}
  thrown in /var/www/wtcweb/main/inc/class_steam.php on line 102" while reading response header from upstream, client: CENSORED IP, server: wtcghostcommunity.com, request: "GET /member.php?action=profile&uid=163 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "wtcghostcommunity.com", referrer: "https://wtcghostcommunity.com/"


When I ran the upgrade script:


2017/04/14 00:24:29 [error] 31606#0: *52 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined method datacache::update_reportreasons() in /var/www/wtcweb/main/install/upgrade.php:598
Stack trace:
#0 /var/www/wtcweb/main/install/upgrade.php(382): buildcaches()
#1 {main}
  thrown in /var/www/wtcweb/main/install/upgrade.php on line 598" while reading response header from upstream, client: CENSORED IP, server: wtcghostcommunity.com, request: "POST /install/upgrade.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "wtcghostcommunity.com", referrer: "https://wtcghostcommunity.com/install/upgrade.php"

I wanted to note, some things, like visiting the Index Page, works fine.

The website url is https://wtcghostcommunity.com, I've locked down the board for now until the errors are fixed.
When you upgrade your forum, you should disable all plugins because that can cause errors such as that one. I use PHP 7.1 and don't generally encounter errors unless I am working on something and didn't use correct syntax.
Well, I've contacted the creator of the steam login plugin, do I have to re-upgrade, and if yes, will it fix the profile error caused by steam-login if I disable and re-enable it? Or do I have to wait for the creator to update his script because of the missing function 'bcsub()'? I've updated the steam login plugin today.
update_reportreasons() was introduced with MyBB 1.8.11, so make sure you have overwritten the inc/class_datacache.php file correctly. If you haven't encountered any other problems during the upgrade, you should be fine after rebuilding the reportreasons cache from Tools & Maintenance → Cache Manager.

bcsub() is a function of the bcmath PHP module, which your server is apparently missing (https://secure.php.net/manual/en/bc.installation.php; http://stackoverflow.com/questions/34003...ath-module).
Thank you very much devilshakerz, I do not know why most of the 'basic' php packages got missing after upgrading to php7, but your answer fixed my issue.