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?


You need to use AddType instead of AddHandler.


LoadModule php5_module  /usr/product/php/current/libs/libphp5.so
AddType application/x-httpd-php .php .phtml .php3

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.