Simon Bennett

Web Developer

Web Development Simon Bennett

Compile PHP with threads and proccesses

Posted: May 19, 2013

For my university dissertation next year I am going to need to create a high performance application in PHP and the only way to perform this is by multi threading and multi processing the workload.

As the documentation on the area is not amazing for telling you how to install it I thought I would post how I managed it. (You may need to update the links)

apt-get update
apt-get upgrade -yq
apt-get -yq install bzip2 openssl libxml2 libxml2-dev gcc make autoconf htop sudo git dstat
tar xvjf php-5*.tar.bz2
cd php-5*
cd ext/
git clone git://
cd ../
./buildconf –force
./configure –enable-maintainer-zts –enable-sockets –enable-pcntl –enable-pthreads –with-tsrm-pthreads
make test
make install

Or If you want a one liner

wget; sudo sh InstallPHP

You can all more options to the configuring of php depending what you need.

Written By Simon Bennett (find me on )

Leave a Reply

Your email address will not be published. Required fields are marked *