2

I installed php70 and php70-xdebug using brew.

brew install php70
brew install php70-xdebug

php -v returns this error:

Cannot load Xdebug - it was built with configuration API320151012,NTS, whereas running engine is API320151012,NTS,debug

I can't figure out how to pass --disable-debug to the compiler, brew uses preconfigured formula (https://github.com/Homebrew/homebrew-php), and doesn't allow to set this option.

The problem is: xdebug formula has --disable-debug, and php70 formula has an option --with-debug, but even if you don't use this argument, it appends --enable-debug to the configure command.

0

1 Answer 1

3

I found a workaround, it isn't perfect to do that, but it works!

  1. Edit the Formula with brew edit php70-xdebug and add --enable-debug to the configure command :

    system "./configure", "--prefix=#{prefix}",
                      phpconfig,
                      "--disable-dependency-tracking",
                      "--enable-xdebug",
                      "--enable-debug"
    
  2. Recompile the library

    brew reinstall php70-xdebug --build-from-source
    

Same thing works with php70-opcache as well.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.