I have cPanel & WHM 104 (build 7) on a CentOS 7.9 server, with PHP 8.1.9. I would like to install the PHP Parallel extension, which requires ZTS.
https://github.com/krakjoe/parallel
https://www.php.net/manual/en/parallel.setup.php
https://github.com/krakjoe/parallel/blob/develop/INSTALL.md
From the instructions there I tried installing with pecl:
I found this thread that describes how to re-make PHP:
https://stackoverflow.com/questions/59601583/how-to-install-php-zts-manually-on-the-centos-7
If I follow the instructions listed there with php-8.1.9.tar.gz, would there be any conflicts or issues with cPanel? Would cPanel later try to revert the changes or anything like that? Here's what I think the instructions from that thread look like, with 8.1.9 instead:
Any advice or suggestions or guidance is appreciated.
https://github.com/krakjoe/parallel
https://www.php.net/manual/en/parallel.setup.php
https://github.com/krakjoe/parallel/blob/develop/INSTALL.md
From the instructions there I tried installing with pecl:
But at the end I get the error:/opt/cpanel/ea-php81/root/usr/bin/pecl install parallel
I also tried installing from source:checking for ZTS... configure: error: parallel requires ZTS, please use PHP with ZTS enabled
ERROR: `/root/tmp/pear/parallel/configure --with-php-config=/opt/cpanel/ea-php81/root/usr/bin/php-config' failed
But I get the error:git clone https://github.com/krakjoe/parallel.git
cd parallel
/opt/cpanel/ea-php81/root/usr/bin/phpize
./configure --enable-parallel --with-php-config=/opt/cpanel/ea-php81/root/usr/bin/php-config
I asked my web host about this extension and they said:checking for ZTS... configure: error: parallel requires ZTS, please use PHP with ZTS enabled
Is there any way for me to manually add ZTS to my PHP? Do I need to re-compile, and if so would this carry risks? I don't really know what I'm doing and I don't want to break anything, and my web host is not wiling to do this for me.On all of our servers that have control panels, PHP is RPM built and is not a source install so we cannot just compile new modules into it if they don't fit what the control panel has installed.
We are unable to compile in support for ZTS on this server since it is an RPM-provided install of apache and php.
I found this thread that describes how to re-make PHP:
https://stackoverflow.com/questions/59601583/how-to-install-php-zts-manually-on-the-centos-7
If I follow the instructions listed there with php-8.1.9.tar.gz, would there be any conflicts or issues with cPanel? Would cPanel later try to revert the changes or anything like that? Here's what I think the instructions from that thread look like, with 8.1.9 instead:
Would it be safe to execute these instructions? If I try this, is there anything I should back up first?wget http://www.php.net/distributions/php-8.1.9.tar.gz && tar zxvf php-8.1.9.tar.gz
yum install -y libxml2-devel sqlite-devel
cd php-8.1.9 && ./buildconf --force && ./configure --enable-debug --enable-zts --prefix=/usr --with-config-file-path=/etc
make && make install
Any advice or suggestions or guidance is appreciated.