Ubuntu – PHP not working on fresh install

PHPUbuntu

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

http://www.socialblogr.com/2010/08/how-to-install-php-monggodb-monggo-driver-on-linux-ubuntu.html

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