[Ubuntu]修正Ubuntu从1604升级1804之后php无法解析问题


这两天把VPS系统从1604升级到1804,升级之后php无法解析,所有php页面都显示源码。

使用网上网上搜到的方法已经解决,具体步骤如下:

sudo apt-get –purge remove php*
sudo apt autoremove
sudo apt-get install php

安装如下插件,如果不需要可以不安装。

libapache2-mod-php* libapache2-mod-php7.2* php-common* php-curl* php-mbstring* php-mysql* php-xml* php-zip* php7.2-curl* php7.2-cli* php7.2-common* php7.2-curl*
php7.2-json* php7.2-mbstring* php7.2-mysql* php7.2-opcache* php7.2-readline* php7.2-xml* php7.2-zip*

重启apache(或者其他http服务端)

/etc/init.d/apache2 restart


发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注