jmnielsen7 - 3:03 pm on Mar 22, 2013 (gmt 0) [edited by: jmnielsen7 at 3:43 pm (utc) on Mar 22, 2013]
AddType principally adds a content type header to the HTML page that is output.
AddHandler principally tells Apache to invoke a PHP handler for .php files. There are several ways of doing that, hence several variations in the syntax.
The functionality and the syntax has also varied between Apache 1.3, 2.2 and 2.4.
As I can never remember the "right way" for each version, and what you need to do can also depend on other server settings set by the host, it often is a case of trying different things until it works.
Thanks for this clarification as well. I read the Apache documentation and got a sense for what the AddType and AddHandler directives are supposed to do, but as pointed out in the quotes above sometimes those directives have to be used in seemingly nonsensical ways to get a particular configuration working. After reading almost 20 articles and forum pages on this topic I began to suspect that some of the variety in the ways of doing it also depended on the particular Handler/Interpreter that one was using server-side for PHP.
According to this website [blog.servint.net] some of the common PHP handlers are: DSO (mod_php, a.k.a the integrated Apache PHP module), CGI, FastCGI, and suPHP.
However since I am using an "all defaults" installation on RHEL/CentOS by just installing all the necessary yum packages and then double-checking the apache config ('yum install php' gives you /etc/httpd/conf.d/php.conf, which utilizes the Apache module it looks like, if that's what the php5-script handler is), therefore I'm not even messing with the "alternative" ways of running it such as through CGI or suPHP. I essentially want to know (for my purposes) what the "standard" settings for AddHandler and AddType are when only utilizing Apache's own PHP module.
[edited by: jmnielsen7 at 3:43 pm (utc) on Mar 22, 2013]