Compiling PHP 7.4.x with pthreads (https://github.com/pmmp/pthreads) enabled
build-essential autoconf libtool bison re2c pkg-config git-core libsqlite3-dev libonig-dev libzip-dev libltdl-dev libbz2-dev libxml2-dev libxslt1-dev libssl-dev libicu-dev libpspell-dev libenchant-dev libmcrypt-dev libpng-dev libjpeg8-dev libfreetype6-dev libmysqlclient-dev libreadline-dev libcurl4-openssl-dev
cd /var/sources
wget https://www.php.net/distributions/php-7.4.24.tar.gz
tar -zxf php-7.4.24.tar.gz
cd php-7.4.2
./buildconf --force
CONFIGURE_STRING="--prefix=/etc/php/7.4z \
--with-config-file-path=/etc/php/7.4z/cli \
--with-config-file-scan-dir=/etc/php/7.4z/conf.d \
--with-bz2 --with-zlib --enable-zip --disable-cgi \
--enable-soap --enable-intl --with-openssl --with-readline --with-curl --enable-ftp \
--enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-sockets \
--enable-pcntl --with-pspell --with-enchant --with-gettext --with-gd --enable-exif \
--with-jpeg-dir --with-png-dir --with-freetype-dir --with-xsl --enable-bcmath \
--enable-mbstring --enable-calendar --enable-simplexml --enable-json --enable-hash \
--enable-session --enable-xml --enable-wddx --enable-opcache --with-pcre-regex \
--enable-cli --enable-debug --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data \
--with-mcrypt --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop \
--enable-maintainer-zts"
Note the install path is /etc/php/7.4z
./configure $CONFIGURE_STRING && make && make install
mkdir /etc/php/7.4z/cli
cp /var/sources/php-7.4.24/php.ini-production /etc/php/7.4z/cli/php.ini
cd /usr/bin
ln -s /etc/php/7.4z/bin/php php7.4z
Download and build pthreads (pmmp fork: https://github.com/pmmp/pthreads)
cd /var/sources
git clone https://github.com/pmmp/pthreads.git
cd pthreads
/etc/php/7.4z/bin/phpize
./configure --prefix='/etc/php/7.4z' --with-php-config='/etc/php/7.4z/bin/php-config'
make && make install
cd /etc/php/7.4z/conf.d
echo "extension=pthreads.so" > pthreads.ini