I am taking over an application server and discover that it contain the following settings:
AddType text/html php
Although it works, but my understanding is that it should set as following:
AddType application/x-httpd-php php .php
What are the key differences between the two settings? Although at this point my application (Built using CakePHP) is running fine with either configuration, but I am not sure if it will cause any strange behaviour.
Thanks!
The mod_mime AddType definition from the Apache httpd docs:
In short
AddType text/html php
tells httpd to specify the Content-Type header for PHP files to be text/html. Which is correct since it is used by the client side browser and not the server itself.What tells httpd to handle the files as PHP is the SetHandler directive:
The PHP configuration instructions explain the SetHandler directive in relation to PHP as well.