skip to Main Content

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


  1. Chosen as BEST ANSWER

    I solved this problem. Maybe there are someone who use CPanel and get same case with me. I remove all setting in htaccess and PHP can execute instead download. Hope this help. Thank you


  2. you must add php handler in apache config

    <FilesMatch .php$>
    SetHandler application/x-httpd-php
    

    Login or Signup to reply.
  3. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search