Announcement

Collapse
No announcement yet.

Apache/PHP

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Apache/PHP

    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.
    Last edited by Hoth; Jan 01, 2019, 09:09 AM.

    #2
    Good to know, thanks. I run a LAMP installation, under Kubuntu 18.04, for website development. It does not face the 'net.
    Kubuntu 23.11 64bit under Kernel 6.8.1, Hp Pavilion, 6MB ram. All Bow To The Great Google... cough, hack, gasp.

    Comment

    Working...
    X