Setting Filters for PHP in Apache2

In a post on the PHP bug forum I came across that litte howto about using the correct filter syntax for PHP in Apache2 [1].

# bad example (a)
AddInputFilter PHP php
AddOutputFilter PHP php

AddType x-httpd-php .php

# bad example (b)
SetInputFilter PHP
SetOutputFilter PHP

AddType x-httpd-php .php

# not bad (c)
AddInputFilter PHP php
AddOutputFilter PHP php

# good (d)
AddType x-httpd-php .php

[1] http://bugs.php.net/bug.php?id=18648

Leave a Reply