#36772 [WFx]: Apache installation docs erronously suggest AddType rather than AddHandler
| From: | noodlet at gmail dot com | Date: | Mon, 20 Mar 2006 15:17:45 +0000 |
| Subject: | #36772 [WFx]: Apache installation docs erronously suggest AddType rather than AddHandler | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969372439@lists.php.net to get a copy of this message | ||
ID: 36772
User updated by: noodlet at gmail dot com
Reported By: noodlet at gmail dot com
Status: Wont fix
Bug Type: Documentation problem
Operating System: N/A
PHP Version: Irrelevant
New Comment:
I've been asked to post this on behalf of somebody else who can't,
given this ticket's current status.
=== lamp (lampiluoto at gmail dot com) says:
Even though AddType "works" in basic setup, there are 3rd party modules
that rely on proper use of handlers. One example of AddType *not*
working is mod_security and audit logging.
If one uses mod_security and audit logging with
'SecAuditEngineDynamicOrRelevant' to log requests on dynamic or
relevant content then using AddType doesn't work. Mod_security
considers content dynamic if handler is not null and therefore use of
AddHandler is necessary. If
AddType is used as PHP's documentation advices, dynamic content
produced with PHP won't be logged.
Reference to mod_security audit log documentation:
http://www.modsecurity.org/documentation/modsecurity-apache/stable/07-logging.html#N109C4
Regards,
--
Tero
Previous Comments:
------------------------------------------------------------------------
[2006-03-20 15:57:30] noodlet at gmail dot com
Thanks colder@php.net for the patch. It looks like the faq contains
AddType as well, so I'll update your patch when I figure out how to
grab the docs source :)
"Rasmus said something and must be right" isn't terribly convincing.
AddType tells the browser what to do with a file. AddHandler tells the
server what to do with a file.
While it's true that AddHandler didn't exist 8 years ago, it does now.
This is confusing for people learning about apache. I personally
remember wondering why AddType was used for both mime types and dynamic
content.
It has been pointed out to me elsewhere that AddType interferes with
mod_security's auditting. So clearly, this isn't "just academic".
Thanks
------------------------------------------------------------------------
[2006-03-18 02:21:20] nlopess@php.net
Rasmus comments about this (
http://marc.theaimsgroup.com/?l=php-dev&m=110358407015432&w=2
):
"There was a time when there was no AddHandler directive. Addtype was
the way you did this. Since AddType works with every version of Apache
I never saw a
reason to change this even after AddHandler was added since it is
purely academic in nature."
------------------------------------------------------------------------
[2006-03-17 18:50:24] colder@php.net
Ok, if AddHandler is definitely the term to have in the manual for
Apache1/2, then here is the patch :
http://www.colder.ch/patches/apache-configuration.patch
Thanks in advance.
------------------------------------------------------------------------
[2006-03-17 16:54:51] noodlet at gmail dot com
Sorry!
I meant AddHandler, not AddModule.
AddHandler application/x-httpd-php .php .phtml
AddHandler application/x-httpd-php-source .phps
noodl
(Must remember to think before typing)
------------------------------------------------------------------------
[2006-03-17 15:33:06] mike@php.net
What are you talking about, AddModule just loads the libphp[45].so
apache module?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/36772
--
Edit this bug report at http://bugs.php.net/?id=36772&edit=1