From LedHed's Wiki
If when you browse to a .php file and the browser wants to download it instead of rendering the page then the webserver is missing the PHP modules.
Ubuntu/Apache2
apt-get install libapache2-mod-php5
This will install the PHP5 module and enable PHP within Apache2.
References
http://stackoverflow.com/questions/6245895/apache2-on-ubuntu-php-files-downloading