Ubuntu – PHP not working on fresh install


Ok so i just installed apache2 and php5 following along with this tutorial


But php isn't working, when i try to view a .php file i just the the entire code, although php is installed and i restarted the server

< ?php phpinfo(); ?>

Best Answer

Have checked that your apache conf file is loading the module? You should have a line something like this:

LoadModule php5_module        libexec/apache22/libphp5.so

The paths may be different on your machine. But often package installers will add the correct line, but leave it commented out.

Related Question