Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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: http://i.stack.imgur.com/g4Gfp.png

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

Any ideas?

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

1 Answer

up vote 0 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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