Topic: PHP 5.6 + Pthreads + EL7

Hi, I try to install pthreads from remi-php56 repo, the installation is ok but I cannot load the extension, I got "undefined symbol sapi_globals_id in Unknown on line 0" message error. Search on internet I find that is because PHP have thread safety disabled.

So, the question is: how I can install php 5.6 on centos 7 from the repo with thread safety enabled and pthreads working? If I can, zts is enable both on cli and apache?

Thank you.

Re: PHP 5.6 + Pthreads + EL7

This extension is only for ZTS build and only for CLI

use the "zts-php" command

$ zts-php -m | grep thr
pthreads 
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP 5.6 + Pthreads + EL7

Remi wrote:

This extension is only for ZTS build and only for CLI

use the "zts-php" command

$ zts-php -m | grep thr
pthreads 

Thank you, I finally launch a simple php file that use Thread smile.