Will there ever be a libapache2-mod-php5 for the MPM worker ?

Asked by Johan Andersson

Right now we use the Prefork worker but would also like to test the MPM worker. The problem here is that libapache2-mod-php5 is dependent on Prefork and is removed when MPM is installed. Why is libapache2-mod-php5 dependent on Prefork and will there ever be a libapache2-mod-php5 that can be used with MPM ?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu php5 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Axel H. (staff-pro-unreal) said :
#1

The Apache PHP-Module is not thread safe and therefore it cannot be used with apache-mpm-worker. Even the ZendServer solution uses prefork AFAIK. If you wish to use apache-mpm-worker you will have to set up php-cgi with fastcgi (apache2-mod-fcgid). This has some pros and cons.

Pros.:
- It's not that memory consuming as mop-php
- You can use the better scaling apache2-mpm-worker
- Separate php.ini files / conf.d / ENV per VHost
- Can use suEXEC

Cons:
- More difficult to set up than mod-php (does not run out of the box)
- No support of php_(admin_)_value and php_(admin_)_flag directives in vhost.conf or .htaccess

I'm using php5 + fastcgi for Magento Shops which perform way better in this configuration. If you're using php 5.3.3 (Maverick and up) you may give php-fpm a try. But its a pain to set it up with apache (with nginx or lighttpd this works like a charm).

Can you help with this problem?

Provide an answer of your own, or ask Johan Andersson for more information if necessary.

To post a message you must log in.