Call us Toll-Free:
1-800-218-1525
Live ChatEmail us

 Sponsors

How to install PHP 5.2.11 with php-fpm

Mike Peters, 11-10-2009
This post will walk you through the process of installing PHP 5.2.11 to run under NGinx using PHP-FPM.

NGinx doesn't have built-in support for running PHP, it uses a third-party daemon to spawn instances of php-cgi and then communicates with those instances over sockets.

PHP-FPM is a replacement for spawn-cgi. Runs faster and is more reliable.

Step 1: Download PHP 5.2.11 and apply PHP-FPM patch

cd /home
mkdir temp
cd temp
wget http://www.softwareprojects.com/files/auto/php-5.2.11.tar.gz
wget http://www.softwareprojects.com/php-5.2.11-fpm-0.5.13.diff.gz
tar zxvf php-5.2.11.tar.gz
gzip -cd php-5.2.11-fpm-0.5.13.diff.gz | patch -d php-5.2.11 -p1

Step 2: Configure PHP

cd php-5.2.11
'./configure' '--enable-fastcgi' '--enable-fpm' '--enable-calendar' '--enable-ftp' '--enable-mbstring' '--enable-mysql' '--with-curl' '--with-dom' '--with-mcrypt' '--with-gd' '--with-iconv' '--with-jpeg-dir=/usr/lib' '--with-mysql=/usr/local/mysql' '--with-openssl' '--with-soap' '--with-sockets' '--with-zlib' '--enable-zip'
make all

Step 3: Install

make install
strip /usr/local/bin/php-cgi

Step 4: Start PHP-FPM

/usr/local/sbin/php-fpm start
Enjoyed this post?

Subscribe Now to receive new posts via Email as soon as they come out.

 Comments
Post your comments












Note: No link spamming! If your message contains link/s, it will NOT be published on the site before manually approved by one of our moderators.



About Us  |  Contact us  |  Privacy Policy  |  Terms & Conditions