Select Page
This entry has been published on 2018-07-13 and may be out of date.

Last Updated on 2018-07-13.

[:en]

Scenario

You are doing a Ubuntu LTS upgrade from 14.04. Having new 16.04 installed, everything seems fine, but after the upgrade to 18.04, Apache shows only blank pages for PHP sites. Even simple commands like phpinfo() do not work. The common log files do not show any information about it.

Cause

The general PHP upgrading process from 5 to 7 (and to 7.2) seems to not always work well.

For whatever reason, the Ubuntu upgrade process declares some Apache PHP library modules as obsolete and deletes them, or at least disables them. So you might finish the upgrade with Apache having not enabled any PHP library module at all.

Quick Fix

Re-enable the module:

a2enmod php7.2

Details

See /etc/apache2/mods-available directory to find the most recent available PHP module version.

If no PHP module is installed, run

apt install libapache2-mod-php7.2

See /etc/apache2/mods-enabled for potential dead links, then re-enable the module via above a2enmod command.

Additional Note

Ubuntu 18 upgrade also removes Let’s Encrypt’s certbot tool, you might have to reinstall it.

 [:]