PHP 5.3.3 Released
php.net
php.net
This looks particularly interesting. I googled it and found http://php-fpm.org/ . I didn't previously realize that a fastcgi implementation had been merged into PHP core. Sweet!
PHP-FPM used to exist as a patch for PHP (http://php-fpm.org/downloads/). It's now in core, and can be built with the --enable-fpm configure flag.
http://pecl.php.net/bugs/bug.php?id=11988
How have you been managing the php-cgi children?
1) When you select mod_php/the Apache SAPI, certain functions get disabled like chroot() and pcntl_fork() since they're not safe to be used under Apache. This is annoying when you have some backend scripts that need those functions.
2) If you run PHP with all the popular plugins, you're looking at about 15MB per Apache process/thread. @256 active clients that's almost 4GB of RAM. Insane, especially considering it's loaded in memory whether or not the requested resource is PHP or not.
I recently switched to Nginx+FastCGI and I'm very happy with the speed and memory usage. FPM makes it even better.
Before (5.3.x):
tar xjvf php-5.3.2.tar.bz2
cd php-5.3.2
svn co http://svn.php.net/repository/php/php-src/trunk/sapi/fpm sapi/fpm
./buildconf --force
./configure --enable-fpm ...
make
sudo checkinstall -D make install
After (5.3.x):
tar xjvf php-5.3.3.tar.bz2
cd php-5.3.3
./configure --enable-fpm ...
make
sudo checkinstall -D make install
Before (< 5.3.x):
tar xjvf php-5.2.13.tar.bz2
wget php-fpm.org/downloads/php-5.2.13-fpm-0.5.14.diff.gz
gzip -cd php-5.2.13-fpm-0.5.14.diff.gz | patch -d php-5.2.13 -p1
cd php-5.2.13
./configure --enable-fastcgi --enable-fpm ...
make
sudo checkinstall -D make install
After (< 5.3.x):
PHP 5.2.x is no longer supported. Stop using it.
nginx's configuration is the same for all.(their data storage API is removed from their 5.3.x build)
Prefer it's stability over APC and xcache.