I have a vps with bigrock which had php version 5.3.3 installed. I have recently upgraded php to version 5.6 because some php functions were not working. Now after removing old php and installing version 5.6 i can use php from terminal but files on my website are not being executed instead files are being downloaded with all php source code.
I think that apache is not using newly installed php. To solve this i added this line in my httpd.conf file :
LoadModule php5_module "/usr/bin/php"
This php path i got by
which php command.
When i added this line and restarted apache it gave me a warning
[warn] module php5_module is already loaded, skipping
I think that i need to tell apache correctly about newly installed php.