Ubuntu 16.04
Apr 24, 2016
可喜可贺,16.04 千呼万唤始出来,那么先升级一个吧.
升级 Ubuntu 自然比滚来滚去的某东西简单些.
do-release-upgrade
没了,等他升级完之后,我就发现了一个问题.我博客挂了.
具体一看,哎呦?PHP 5 没了!
看了眼 Release Note,嗯没错,PHP 5 没了,变成了 PHP 7.
PHP 7.0
PHP was upgraded to 7.0\. Note that this will require modifications to custom PHP extensions (https://wiki.php.net/phpng-upgrading) and may require modifications to PHP source code (http://php.net/manual/en/migration70.php).
那么就装上 PHP 7 就好了.
apt-get install php7.0-fpm libapache2-mod-php7.0 php7.0-mysql php7.0-curl php7.0-json
apachectl restart
妥,现在博客起来了.
刚刚发现博客正文没了,观察 error.log 发现是代码插件的锅:
PHP Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/blog/wp-content/plugins/wp-code-highlight/wp-code-highlight.php on line 68, referer: https://oao.moe/
那么解决办法也很简单,换一个.这里换成了 highlight.js
在 header 或 footer 处添加即可.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.