Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Seems easy, right? Done it a million times, right? Me too. For some reason this isn't working on an A2 hosting configuration. Anyone have any ideas?

In .htaccess in "/" directory

AddType application/x-httpd-php .html

test.php which is "Hello World" executes just fine. test.html downloads instead of parsing.

I have read lots of Q&As and no luck. What is missing? What other configs can I examine? Thanks.

share|improve this question
Are you using mod_php or CGI? What does phpinfo(); tell you for Server API? – DerfK Apr 18 '11 at 20:53
@DerfK CGI/FastCGI – csi Apr 18 '11 at 21:04
up vote 3 down vote accepted

I don't know if this is legal or not but I am responding to my own question so the answer is there for others to use in the future.

For some reason the default file permissions were all set to 777 or 666 which caused issues with them being served correctly. By adjusting the file permissions to 644, these issues were solved. Of course the .htaccess AddType was also required.

share|improve this answer
It's 100% permitted, and encouraged if none of the other answers were appropriate. You can even give yourself the tick. – Mark Henderson Apr 20 '11 at 0:38

Is the module loaded? E.g. LoadModule php5_module modules/

share|improve this answer
I added <IfModule !php5_module> # If the PHP5 module has NOT already been loaded, load it LoadModule php5_module modules/ </IfModule> but that creates a server error. How else can I check if the module loaded? .php files work so I assume that it works? – csi Apr 18 '11 at 20:15
I misread your post. My answer is wrong. – Mark Wagner Apr 18 '11 at 20:52

look if .htaccess is allowed to be read into the directory you have it. into httpd.conf you will need to have AllowOverride for that location see

share|improve this answer
htaccess is allowed into that directory. Thanks though. – csi Apr 19 '11 at 19:16

Your Answer


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.