With myself recently installing the former module because of certain annoying Internet scum, it was aparent to me that some of the latter’s pages weren’t being handled in some curious cases. After fiddling with module loading order, I eventually isolated it to the fact I had the mod_security’s directive set to SecFilterEngine DynamicOnly as when it was set to SecFilterEngine On, which would filter every request, everything worked as it should though at the expense of greater CPU time.
So reverting things back to the way they were and digging around in mod_security’s documentation, it turns out that by default PHP isn’t explicitly set as a dynamic page and only implicitly made dynamic by virtue that most Apache installations are set up to choose a module, which in our case is PHP, based on it’s MIME-type. Here’s the little fix for your httpd.conf by finding:
# Extensions that are parsed as PHP AddType application/x-httpd-php .php .phtml # Extensions that are parsed as PHP source AddType application/x-httpd-php-source .phps
… and replace with:
# Extensions that are parsed as PHP AddHandler application/x-httpd-php .php .phtml # Extensions that are parsed as PHP source AddHandler application/x-httpd-php-source .phps
Restart Apache and those filters that “occassionally don’t work for PHP” should be a thing of the past! :D