2

I trying to install pthreads on Mac Os X. When I execute:

sudo pecl install pthreads

I get error:

checking checking for ZTS... configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled ERROR: `/private/tmp/pear/temp/pthreads/configure' failed

So the question is how to recompile php with ZTS enabled for OS X?

2 Answers 2

3

I suggest you don't recompile OS X native php. Instead build and install new thread-safe version to different location.

If you use homebrew you should install it with -with-thread-safety option.

If you prefer to build it manually add --enable-maintainer-zts option to configure script.

2
  • 1
    Please, can you provide step by step instruction?
    – Gleb
    May 15, 2015 at 10:59
  • I just went through this, I made a gist for this specific setup.
    – tam5
    Feb 16, 2016 at 17:30
1

Sadly Homebrew is not supporting the thread-safe version anymore: https://github.com/Homebrew/homebrew-core/blob/master/Formula/php.rb#L56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.