Computer geek stuff, Linux

pthreads install on CentOS with cpanel (resolved)

I upgraded from PHP5.4. (end of life) to PHP5.6, and lost the functionality of pthreads on my CentOS6.7 VPS.
After much searching and trials, it turns out that I need specify the specific version of pthreads to be installed, otherwise the newest version gets installed. In this case the newest version pthreads-3.0.9 is only available for php7.0
The last version that worked with PHP5.x is pthreads-2.0.10. None of the 3.0.x versions of phteads work with the php 5.x family.

So to install pthreads to work with php 5.6, run:
#pecl install pthreads-2.0.10

 

Just for reference, if you try to install the latest pthreads (currently 3.0.9) while running php 5.x, you get the message:

pecl/pthreads requires PHP (version >= 7.0.0RC2), installed version is 5.6.15
No valid packages found
install failed

After pthreads are installed, restart the apache web server

#service httpd restart

Leave a Reply

Your email address will not be published.