Monday, August 8, 2016

server - PHP and Apache2 broken after upgrade to Ubuntu 16.04



I've been having a lot of trouble fixing up the remains of my server after upgrading to Xenial yesterday.



PHP apps run as a mess of code, and ownCloud 'can't be found on the server' anymore.



It may be something to do with these errors I get when trying to run Apache2 from the command line.




After running systemctl daemon-reload'



I hope I can get some help on this, a lot of computers rely on this thing :/



I'd provide some more logs, but they are huge and I wouldn't know what parts to provide.



Oh, and I get this error when trying to install PHP5, if this helps.



When trying to install PHP5




Thanks in advance.



EDIT: Here's the output from running 'apache2' from the command line:



'apache2' command line output



Ubuntu 16.04 comes with PHP 7.0. You need to install libapache2-mod-php package and then disable all traces of PHP5.




  1. Uninstall PHP5.x package: sudo apt-get purge php5-common (this will remove all PHP 5 packages.


  2. Install default (7.0) PHP apache2 SAPI: sudo apt-get install libapache2-mod-php

  3. If the apache2 is still broken do: sudo rm /etc/apache2/mods-enabled/php5.* to disable PHP5 mod and enable PHP 7.0 with sudo a2enmod php7.0.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...