Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What the difference between the php5 module (libapache2-mod-php5) and the php5 filter module (libapache2-mod-php5filter) for apache2? Which one should I use in which environment?

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

libapache2-mod-php5filter doesn't pass all http request methods through to your PHP application - for example, PUT and OPTIONS requests are answered directly by Apache, rather than your PHP application.

I assume that it's limiting the methods that get processed by PHP as a security measure.

libapache2-mod-php5, on the other hand, passes all requests through for processing by PHP.

From https://launchpad.net/ubuntu/+source/php5/5.3.3-7ubuntu1, this message:

"Unless you specifically need filter-module support, you most likely should instead install libapache2-mod-php5"

share|improve this answer
    
See below. Filter modules (mod-php5filter) are completely different from content modules (mod-php5). –  lucian303 May 24 '13 at 23:30
add comment

For ease of deployment and configuration, use libapache2-mod-php5.

It really is a lot easier, but causes higher memory usage (as PHP is loaded for each request)

For scalability, use mod_fcgi and php-fpm.

Because it runs a pool of PHP Listeners, then uses FastCGI protocol to communicate between Apache and the Pool of PHPs.

share|improve this answer
add comment

libapache2-mod-php5filter is used for internal apache php filters. I suppose you could run apps this way, but it's far from recommended as this is not its intention. mod-php5 on the other hand is a content module that generates content (from your php app) and that is what should be used.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.