0

I've installed php70 using the Remi repository on Centos 7 and need to get thread safety enabled as I am getting the error mentioned in the title.

running:

php70 -i|grep -i thread

I get:

Thread Safety => disabled

I have tried installing the php-pecl-pthreads package via yum but the error persists.

Investigating further (as per this question here), it would appear that thread safety is how the version of php is compiled and not just a php extension.

Should I be using a different repo to have php 7.0 with thread safety? If so, which repo is best? Does it even exist yet in a repo or should I be compiling php 70 with thread safety from source?

Thanks,

Community
  • 1
  • 1
Willem van Ketwich
  • 5,666
  • 7
  • 49
  • 57

1 Answers1

1

From command line, you need to use the zts-php command.

# zts-php -i|grep -i thread
Thread Safety => enabled

Notices:

  • the zts-php command is only available in php-cli package from remi-php70 repository (not in the php70-php-cli SCL package)
  • the Threaded class command is provided by the pthreads extension (which requires a ZTS build) and is only available for CLI.
Remi Collet
  • 6,198
  • 1
  • 20
  • 25
  • Hi Remi, I'm unable to execute that command, and doing 'yum search zts' only returns the php-pecl-pthreads package. The repo I'm using is http://rpms.famillecollet.com/enterprise/remi-release-7.rpm Cheers. – Willem van Ketwich Dec 09 '16 at 07:14
  • 1
    How have you installed PHP 7 ? "php-cli" package from "remi-php70" repository provides this command (php70-php-cli, doesn't), see the Wizard: https://rpms.remirepo.net/wizard/ – Remi Collet Dec 09 '16 at 07:53
  • Awesome, thanks Remi! The wizard made it a heap easier. Merci! – Willem van Ketwich Dec 10 '16 at 04:28