1

For some reason, PHP files display as plain text in the browser when I browse locally via MAMP PRO.

I looked through the PHP settings and there doesn't seem to be anything there that would affect this:

enter image description here

I ran phpinfo(); and it's showing version 5.4.10 running fine.

Any ideas?

3
  • If you fixed it, put the solution in as an answer so others can realize this was fixed without reading the entire question May 5 '13 at 18:55
  • have you checked to see if php.so is loaded in httpd.conf? May 6 '13 at 9:44
  • @CanadianLuke Thanks, I added the solution below.
    – Sam Nabi
    Oct 4 '13 at 14:36
3

Fixed it. Turns out I had an .htaccess files in the parent directory, with the following line in it:

AddType x-mapp-php5 .php

Removed the file and now PHP executes properly. I guess I don't need to have this .htaccess file on my local machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.