FS#8382 - Apache's default PHP configuration

Attached to Project: Arch Linux
Opened by Igor Galić (jMCg) - Tuesday, 23 October 2007, 12:23 GMT
Last edited by Pierre Schmitz (Pierre) - Monday, 14 July 2008, 01:38 GMT
Task Type Support Request
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I have noticed that ArchLinux' httpd.conf contains a PHP configuration which is.. not quite as sensible as it could be.

It uses AddType, which should NOT be used for things like PHP or CGI.. It's a very old and grotty hack. For more information please consult: http://www.devside.net/articles/php

Instead, the config should be more like (following the example of <IfModule ..>):

<IfModule dir_module>
<IfModule mime_module>
<IfModule php5_module>
DirectoryIndex index.php index.html
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps
# additionally one could set
AddType text/html .php .phps
# but this is redundant, due to php.ini setting this as well....
</IfModule>
DirectoryIndex index.html
</IfModule>
This task depends upon

Closed by  Pierre Schmitz (Pierre)
Monday, 14 July 2008, 01:38 GMT
Reason for closing:  Fixed
Additional comments about closing:  apache does not contain any php config anymore.
Comment by Lukas Jirkovsky (6xx) - Friday, 21 March 2008, 15:13 GMT
I can't see any difference between this and current httpd.conf
Comment by Glenn Matthys (RedShift) - Tuesday, 17 June 2008, 08:43 GMT
'This' uses AddHandler instead of AddType. The article posted above actually has some solid reasoning. In a nutshell, AddType should be used for client-side typing, AddHandler should be used for server-side typing.

Loading...