Willem van Ketwich
Willem van Ketwich

Reputation: 5984

PHP Fatal error: Class 'Threaded' not found in /var/www/ ... .php on line nn

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,

Upvotes: 0

Views: 472

Answers (1)

Remi Collet
Remi Collet

Reputation: 7041

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.

Upvotes: 1

Related Questions