[mpm-itk] mpm-itk & CGI wrapper or FCGId

Jonas Eckerman jonas_lists at frukt.org
Wed Jan 6 13:38:42 CET 2010

Alex Tordi wrote:

> someone uses itk and FCGId or CGI wrapper.

I'm assuming you refer to "mod_fcgid".

> which will be better, and faster

Wich is better depends on what you want.

In general, mod_php is probably faster just after startup. AFAIK, 
mod_fcgid doersn't support startup preloading of fastcgi apps (all the 
older FastCGI runners I've used supported this, so hopefully mod_fcgid 
will too in the future). Once mod_fcgid has loaded one or more PHP 
instances, the speed should be about the same as for mod_php.

mod_fcgid supports more different tuning since the FastCGI porocesses 
are kept in a separate pool from the apache httpd children. So you may 
tune the httpd children and the PHP processes separately. I've no idea 
wether this is of any benefit to you.

One benefit to running PHP as a FastCGI is that any problematic PHP 
scripts or PHP modules will be separated from the httpd processes. This 
means that if a PHP script or module crashes or goes haywire it will not 
affect the main web server. In some cases this may be a very good idea.

One common reason for running PHP as a FastCGI doesn't apply when using 
mpm_itk. People often run PHP as FastCGI in order to make PHP scripts 
run as different users for different virtual hosts without the huge 
overhead of ordinary CGI.

If using FastCGI PHP with mpm_itk you do need separate fastcgi PHP 
handlers for different virtual hosts if you want the PHP scripts to run 
as the correct user.


Jonas Eckerman
Fruktträdet & Förbundet Sveriges Dövblinda

More information about the mpm-itk mailing list