1. Apache/PHP configuration
1.1. Worker MPM
1.1.1. PHP
1.1.1.1. 5.3 mod_php
1.1.1.1.1. thread_safe
1.1.1.2. 5.2 mod_php
1.1.1.3. CGI
1.1.1.3.1. non thread-safe
1.1.1.4. FastCGI
1.2. Prefork MPM
1.2.1. PHP
1.2.1.1. mod_php
1.2.1.1.1. non thread safe
1.2.1.2. php CGI
1.2.1.3. php FastCGI
2. How to build
2.1. httpd.prefork
2.2. httpd.worker
2.3. apxs
2.4. options
2.4.1. php thread safe + worker = OK
2.4.2. php thread safe + prefork = OK
2.4.3. php non-thread-safe + worker = FAIL
2.4.3.1. --> because of that, mod_php is always built thread-safe
2.5. flavors of php binaries
2.5.1. 4
2.5.1.1. php4-2/bin/
2.5.1.1.1. php-cli
2.5.1.2. php4/bin/
2.5.1.2.1. php
2.5.1.2.2. php-cgi
2.5.1.2.3. php-cli
2.5.2. 5
2.5.2.1. php5-2/bin/
2.5.2.1.1. php-cli
2.5.2.2. php5/bin/
2.5.2.2.1. php
2.5.2.2.2. php-cgi
2.5.2.2.3. php-cli
2.5.3. 5.3
2.5.3.1. php53-2/bin/
2.5.3.1.1. php-cli
3. workarounds
3.1. 1
3.1.1. build mod_php thread-safe
3.1.2. make zend loader loaded only in CGI, FastCGI modes
3.1.3. --> zend loader is not available with mod_php
3.2. 2
3.2.1. build mod_php in two versions: thread-safe, non-thread-safe
3.2.2. zend loader can be used with mod_php and apache in prefork mode
4. Q
5. dependencies
5.1. script execution
5.1.1. apache-restart.pl
5.1.1.1. env_prepare
5.1.1.1.1. [ w httpd.conf.startup ]
5.1.1.1.2. set_hssettings
5.1.1.2. httpd.conf.tmpl
5.1.1.2.1. httpd.conf.startup
5.1.2. hsphere-php53-plugins/postinstall.sh.linux
5.1.2.1. php53/php.d/so-defaults.sh
5.1.2.1.1. [w /hsphere/local/config/httpd/php53/php.d/*.ini]
5.1.2.1.2. [w /hsphere/local/config/httpd2/php53/php.d/*.ini]
5.1.2.2. lint/php_ini_set.php
5.1.2.2.1. [ r php.ini.tmpl.custom ]
5.1.2.2.2. [rw php.ini]
5.2. config files
5.2.1. [...]
5.3. common directory names
5.3.1. scripts
5.3.1.1. /hsphere/local/config/scripts/
5.3.2. config files
5.3.2.1. /hsphere/local/config/