I updated PHP 5 to PHP 7, but I noticed the old version was still configured in my Apache server, so I uninstalled it. Then everything got messy and being all this confusing as this is unless you're an experienced administrator, I just reinstalled apache2 with PHP 7.
However, now the PHP module is not even working because text is being rendered plainly. I am trying to reinstall the PHP 7 module into my apache server but something weird is happening:
When I try installing it with
sudo apt-get install libapache2-mod-php7.0, I am getting a dpkg error, but the module is being installed because if I run
sudo apt-get remove libapache2-mod-php7.0 it can be uninstalled.
So what can I do? How can I properly install and configure the PHP 7 module in Apache?
sudo dpkg --configure -a and got this output:
Configuring libapache2-mod-php7.0 (7.0.7-4+deb.sury.org~trusty+1) ... dpkg: error processing package libapache2-mod-php7.0 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were found processing: libapache2-mod-php7.0