I just upgraded from Kubuntu 17.10 to 18.04 (I know, I'm slow). Somehow, the upgrade broke apache/PHP in such a way that apache doesn't execute PHP files, but instead displays the code in the browser. All the packages I can think of are already installed. I've tried every suggested package installation googling mentioned. My guess is the problem is on the apache side with it somehow not being configured to recognize PHP's existence. I tried looking through /etc/apache2/apache2.conf and there's no mention of PHP in there. On the recommendation of https://www.techrepublic.com/article...ing-php-files/ I added
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
to the apache2.conf and restarted apache, but that didn't help. Has anyone encountered this problem before?
It's perhaps worth noting that before the upgrade I was running PHP 7.2 from a PPA (ondrej-ubuntu-php-artful.list). After the upgrade, PHP 7.2 is the standard version so I haven't re-enabled the PPA.
Edit: Finally fixed it with sudo a2enmod php7.2, will leave this up in case it helps anyone else.
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
to the apache2.conf and restarted apache, but that didn't help. Has anyone encountered this problem before?
It's perhaps worth noting that before the upgrade I was running PHP 7.2 from a PPA (ondrej-ubuntu-php-artful.list). After the upgrade, PHP 7.2 is the standard version so I haven't re-enabled the PPA.
Edit: Finally fixed it with sudo a2enmod php7.2, will leave this up in case it helps anyone else.
Comment