MyBB Community Forums

Full Version: PHP 7.2 issue with MyBb 1.8.12
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My website does not work when I activate PHP 7.1.8 or 7.0 on my Plesk VPS.

The ADMIN cp section is functioning fine though. But none of the pages of the forum will load and display a MyBB internal warning.

See attachment for error. PHP ran as fastCGI, PHP-fpm served by nginx it does not matter. 

I just switched back to using PHP 5.6.31 as fastCGI served by apache and it works fine. 

But I really want to upgrade to PHP 7.1.8. Any clues here?

This error in error.log keeps repeating thousands of times:


<error>
<dateline>1504135287</dateline>
<script>inc/plugins/phptpl.php</script>
<line>106</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead</message>
</error>

Any idea guys?

And this one: with a shitton of repeating numbers

<error>
<dateline>1504124156</dateline>
<script></script>
<line>0</line>
<type>20</type>
<friendly_type>MyBB SQL Error</friendly_type>
<message>SQL Error: 2006 - MySQL server has gone away
Query:
INSERT
INTO mybb_searchlog (sid,uid,dateline,ipaddress,threads,posts,resulttype,querycache,keywords)
VALUES ('f13a974a6846440fba6577af042047d4',0,1504124156,X


Forum is also very slow..

Fixed it myself, NVM
Hi,

1.8.12 has several issues with PHP 7.2 at the minute. We've been tracking these issues and they should all be fixed in MyBB 1.8.13. For reference, some of the issues are listed here:

(I believe there are others too).
The /e modifier of preg_replace has been deprecated for a while now. The particular file in the log you show is a plugin, so the owner of the plugin must upgrade it to be PHP 7 compliant.