Check that php is installed properly.
In most of the cases, the following should work:
apt-get install libapache2-mod-php5 service apache2 restart
a2endmod may not be necessary.
When you install libapache2-mod-php5, you’ll notice that it will restart apache2 itself. Still, you need to execute the second and third commands before php actually works.
If you need a full installation, the following commands should be executed first:
apt-get -y install php5 php5-cli php5-curl php5-dev php5-gd php5-mcrypt php5-mysql php-pear
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.