PHP-FPM

PHP FastCGI Process Manager
Download

PHP-FPM Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Michael Shadle
  • Publisher web site:
  • https://launchpad.net/~mshadle

PHP-FPM Tags


PHP-FPM Description

PHP FastCGI Process Manager PHP-FPM is a FastCGI frontend for PHP, and an enhancement of PHP-CGI.Quick start:Choose one of 2 ways to compile fpm. Either integrated or seperate. Unless you are a developer or systems administrator, we recommend the integrated compilation approach. For more information see the file readme.markdown.Install DependenciesThere are (2) Dependencies. If you haven't built php before, you'll need to install libxml dev package. FPM also requires the Libevent library so install libevent-dev too. The command for debian / ubuntu is:sudo aptitude install -y libxml2-dev libevent-devLibevent 1.4.12-stable or higher is recommended, and at least libevent 1.4.3-stable is required. If no suitable version available, download and compile it from the Libevent website.LE_VER=1.4.12-stablewget "http://www.monkey.org/~provos/libevent-$LE_VER.tar.gz"tar -zxvf "libevent-$LE_VER.tar.gz"cd "libevent-$LE_VER"./configure && makeDESTDIR=$PWD make installexport LIBEVENT_SEARCH_PATH="$PWD/usr/local"Integrated compilationDownload fpm and generate the patch fileexport PHP_VER=5.3.0wget "http://launchpad.net/php-fpm/master/0.6/+download/php-fpm-0.6-$PHP_VER.tar.gz"tar -zxvf "php-fpm-0.6-$PHP_VER.tar.gz""php-fpm-0.6-$PHP_VER/generate-fpm-patch"The PHP source code. Download it, unpack it.wget "http://us.php.net/get/php-$PHP_VER.tar.gz/from/us.php.net/mirror"tar xvfz "php-$PHP_VER.tar.gz"cd "php-$PHP_VER"Apply the patch and compilepatch -p1 < ../fpm.patch./buildconf --forcemkdir fpm-build && cd fpm-build../configure --with-fpm --with-libevent="$LIBEVENT_SEARCH_PATH" && makeSeperate compilationThere are (2) Dependencies. If you haven't built php before, you'll need to install libxml dev package. FPM also requires the Libevent library. So install libevent-dev too. The command for debian / ubuntu is:sudo aptitude install -y libxml2-dev libevent-devThe PHP source code. Download it, unpack it, compile it.export PHP_VER=5.3.0wget "http://us.php.net/get/php-$PHP_VER.tar.gz/from/us.php.net/mirror"tar xvfz "php-$PHP_VER.tar.gz"cd "php-$PHP_VER"mkdir php-build && cd php-build../configure && makeNow you can download, Configure and compile the FPM frontendwget "http://launchpad.net/php-fpm/master/0.6/+download/php-fpm-0.6-$PHP_VER.tar.gz"tar -zxvf "php-fpm-0.6-$PHP_VER.tar.gz"cd "php-fpm-0.6-$PHP_VER"mkdir fpm-build && cd fpm-build../configure --srcdir=../ --with-php-src="../../php-$PHP_VER" --with-php-build="../../php-$PHP_VER/php-build" --with-libevent="$LIBEVENT_SEARCH_PATH" && makeConfigure flags--with-libevent Path to the libevent, for fpm SAPI --with-fpm-bin Set the path for the php-fpm binary --with-fpm-port Set the tcp port number to listen for cgi requests --with-fpm-conf Set the path for the php-fpm configuration file --with-fpm-log Set the path for the php-fpm log file --with-fpm-pid Set the path for the php-fpm pid file --with-fpm-user Set the user for the php-fpm to run as --with-fpm-group Set the group for php-fpm to run as. For a system user, this should be set to match the fpm username InstallationIf compiled integrated, then you will get a full php install, including the command line interpreter php-cli, and the PEAR extensions library. The seperate or standalone compilation method will install only the php-fpm daemon and the bare minimum of files required to run it.# See which files will be installedmake install --dry-run# Install into '/'sudo make install# Install into '/opt'sudo INSTALL_ROOT=/opt make installMore about the PHP-FPM Build processThe make process can be described as: 1) Compile the php sources into object files in the php build directory 2) Compile the fpm sources into object files in the fpm build directory 3) Link all the php object file with these fpm object file together 4) Output: Static php5 binary, which is php as base and fpm's fast-CGI SAPI as frontendFpm is mixed into php at the link-level. Andrei has de-coupled the fpm sources, making the SAPI part somewhat less sensitive to changes in the rest of php. PHP-FPM cgi-main.c request handler is derived from the original fcgi-sapi. We are submitting this 0.6 code to PHP Group. We will track developments in PHP and periodically sync changes back from them into the external / standalone project.BuildconfFor the external fpm project, generating ./configure requires certiain versions of the autoconf toolset. You need at least some version of autoconf to install these build tools. If you need to use run buildconf, then it will run ./generate-autotools and try to install these locally. If ./buildconf fails please consult the error log.


PHP-FPM Related Software