php not working, just rendering code

I have installed a server yesterday following this tutorial at, and after much work it worked. Then I deleted a couple folders by mistake. No big deal, I’ll reinstall everything from scratch. And so far so good… until I tried to install php. Apparently, it’s installed, but it renders the code and nothing else. If I use php -v, it says 5.6 is installed. I tried installing php7 to see if that solved the problem, following the instructions at, but nothing

Just in case, based in another similar question, if I do /etc/php$ ls -l /etc/apache2/mods*/php*

then I get this

lrwxrwxrwx 1 root root  11 Nov 30 22:23 /etc/apache2/mods-available/php7.0.conf -> php7.0.conf
lrwxrwxrwx 1 root root  11 Nov 30 22:24 /etc/apache2/mods-available/php7.0.load -> php7.0.load
-rw-r--r-- 1 root root 133 Nov 30 21:55 /etc/apache2/mods-available/php.conf
-rw-r--r-- 1 root root  59 Nov 30 21:55 /etc/apache2/mods-available/php.load
fabio@evankimbrell:/etc/php$ /etc/php$ ls -l /etc/apache2/mods*/php*

Please, I really need help on this!

EDIT: just in case it’s of help, I see the rendered code in Chrome, and a blank page on Firefox. And additionally, php -v says I’m still on 5.6 :(


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Did you restart Apache after installing PHP? :)