Search code examples
phphtmlapachewebservermamp

MAMP - Apache showing source code HTML and PHP pages


I am trying to install Apache on my Mac (OSX 10.8.2).

I am using MAMP, it runs, but whenever I try to view a page (html or php) other than the phpinfo.php, I only see the source code.

There are no errors in the log file.

I have also tried with the pre-installed webserver, same result. Same for XAMP.

How can I get the server to interpret the logic instead of printing it?


Solution

  • Try typing instead of localhost 127.0.0.1 like 127.0.0.1/index.php