Several days ago I did a distro upgrade on this server and the PHP packages was upgraded to version 7.0. Then I noticed this site’s homepage is broken: Only one column can be displayed.
I was suspecting my Baskerville theme at first, but when I check Nginx error log earlier today I found this message:
FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function utf8_decode() in ****/wp-content/plugins/latex/latex.php:141
After disabling my LaTeX for WordPress plugin the homepage returned to normal. I decided to fix the plugin code myself. It seems that the error is caused by the deprecated
utf8_decode() function in PHP 7, so I searched this function with “PHP 7” on Google, looking for substitution function in PHP 7. Immediately I found this question on StackOverflow.
Turns out the
utf8_decode() is not deprecated but I’m missing
php7.0-xml package. Finally, installing
php7.0-xml on my server solved the problem.
Leave a Reply