My .php files not running on WAMP Server, it is trying to save the file instead

I have just cloned a project, so it works perfectly fine when i load it e.g: "localhost/example/contact.html", but when i click to homepage which the endpoint is "localhost/example/index.php" it asks me to save the file like that: https://i.stack.imgur.com/afq10.png

I have checked everything in files such as php.ini, httpd.conf but still cant find a solution, I also reinstalled wamp 2 times.

Also the php error log gives me this error: The file C:/WINDOWS/system32/drivers/etc/hosts does not exists

Any help would be appreciated!


Solution 1:

This sounds like an issue with your .htaccess file. You said you cloned it, so it might be trying to do something not native to that system. If you cant figure it out, try deleting or renaming it to see if that solves the issue.