I have recently been trying to install PHP and Apache on my computer. After many hours, they\'re installed. I have modified the httpd.conf and php.ini files like everyone sa
For PHP 7 (May apply to previous versions as well), but I had to do this:
Add this to the bottom of /etc/apache2/apache2.conf
SetHandler application/x-httpd-php
Run this from the terminal:
sudo a2dismod mpm_event && sudo a2enmod mpm_prefork && sudo a2enmod php7
Then don't forget to restart Apache so it knows you changed stuff:
sudo service apache2 restart
This is a summary from: https://www.atlantic.net/community/howto/try-php7-lamp-ubuntu-14-04/