Apache is downloading php files instead of displaying them

The correct AddType for php is application/x-httpd-php

AddType  application/x-httpd-php         .php
AddType  application/x-httpd-php-source  .phps

Also make sure your php module is loaded

LoadModule php5_module        modules/mod_php55.so

When you’re configuring apache then try to view the page from another browser – I’ve had days when chrome stubbornly caches the result and it keeps downloading the source code while in another browser it’s just fine.

Leave a Comment