Home » Php » php – Enable ZTS on apache CentOS7

php – Enable ZTS on apache CentOS7

Posted by: admin February 25, 2020 Leave a comment


I’m on Centos 7 / apache.

I compiled php with ZTS and compiled pthreads.
With zts-php -i | grep -i thread I get:

Thread Safety => enabled

Everything is okay on this side. The problem is that phpinfo tells me that Thread Safety is not activated. And when I run a php script containing a Thread class I get a “Fatal error: Class ‘Thread’ not found” error.

How to force Apache to activate ZTS mode?

How to&Answers: