Can't install xdebug on Mac with Homebrew

前端 未结 11 834
小蘑菇
小蘑菇 2020-12-24 01:31

I\'m kind of new to using Homebrew, but I love it. It\'s so easy. I\'m trying install Xdebug. Some of the posts on the web say to do this:

brew install xd         


        
11条回答
  •  星月不相逢
    2020-12-24 01:42

    Forget about homebrew for a moment. I have tried doing with it and it is not a that good idea stability-wise. Instead stick to the default installation guide:

    Installing XDebug on Mac OSX

    1. Go to http://xdebug.org/wizard.php and paste your phpinfo() content there.
    2. Download xdebug-2.2.5.tgz (http://xdebug.org/files/xdebug-2.2.5.tgz)
    3. Unpack the downloaded file with:

      tar -xvzf xdebug-2.2.5.tgz

    4. Run:

      cd xdebug-2.2.5

    5. Run phpize (install it via homebrew if you don't have it already)

      phpize

    6. As part of its output it should show (If it does not, you are using the wrong phpize):

      Configuring for: ...
      Zend Module Api No: 20100525
      Zend Extension Api No: 220100525

    7. Run:

      ./configure

    8. Run:

      make

    9. Run:

      cp modules/xdebug.so /usr/lib/php/extensions/no-debug-non-zts-20100525

    10. Edit /etc/php.ini and add the line:

      zend_extension = /usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so

    11. Restart the web server by typing in the terminal:

      sudo apachectl restart

提交回复
热议问题