I use Ubuntu 16.x and now I try in macOS Sierra but I still get this problem. I have read all question regarding this problem but most cases are happen in local server.
I have download Apache2, and PHP 5 in my Ubuntu but its not solved my problem. I don’t have any Idea to solved this. I have a hosting in CPanel and local (lampp) in my Ubuntu. In local server, .php can be execute but when I the put in my hosting it is downloaded instead execute. Is there specific setting in my CPanel or else?
3
Answers
I solved this problem. Maybe there are someone who use CPanel and get same case with me. I remove all setting in
htaccess
andPHP
can execute instead download. Hope this help. Thank youyou must add php handler in apache config
For me, it was due to the PHP version used by my hosting service.
I had to change it to the latest (7.4) and the PHP file started getting executed (not downloaded) on the browser.