PHP compiled as Apache/CGI/suphp/FastCGI :: Advantages/Disadvantages
Apache Module (mod_php)
========================

Advantages:

1. speed
2. needs less memory (RAM) than CGI
3. php.ini values can be changed via PHP scripts, vhost files, .htaccess files


Disadvantages:

1. Scripts are being executed with Apache privileges, which might lead to some security related problems
2. Only one version of PHP can be installed as Apache module
3. It is not possible to have seperate php.ini files for every host

suPHP
============

PHP will be installed as binary and is included into Apache through suPHP

Advantages:

1. Scripts will be executed with user privileges.
2. Each vhost can have its own php.ini file
3. Needs less memory (RAM) than CGI
4. More than one PHP version can be run as suPHP
5. There is no need to uninstall PHP as Apache module (mod_php)

Disadvantages:

1. php.ini values cannot be changed via PHP scripts, vhost files, .htaccess files
2. suPHP might be a little slower than mod_php

CGI
============
The PHP source will be patched and installed as binary.

Advantages:

1. Scripts will be executed with user privileges.
2. More than one PHP version can be run as CGI
3. Compatible with Apache module mod_vhost_alias (mass hosting module) due to our security patch
4. The patch modifies PHP's open_basedir automatically

Disadvantages:

1. CGI might use a little more memory (RAM). Therefore, it's not recommended to run PHP as CGI on slow virtual servers (vServer)
2. php.ini values cannot be changed via PHP scripts, vhost files, .htaccess files

FastCGI
============
PHP will be loaded as FastCGI module into Apache webserver.

Advantages:

1. Scripts will be executed with user privileges.
2. More than one PHP version can be run as FastCGI
3. Might be better in speed compared to CGI and suPHP

Disadvantages:

1. php.ini values cannot be changed via PHP scripts, vhost files, .htaccess files
2. complicated installation/configuration