Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm getting an error when I add the following line to my .htaccess file for a server handling PHP scripts:

AddHandler application/x-httpd-php .html .php

When I try and access a PHP page on my server it goes to a blank page and prompts the user to download the file.

How do I solve this?

share|improve this question
add comment

1 Answer

You need to use AddType instead of AddHandler.

Example:

LoadModule php5_module  /usr/product/php/current/libs/libphp5.so
AddType application/x-httpd-php .php .phtml .php3
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.