0

hi i install homebrew install some brew things and now i need install Xdebug but when i write to terminal on mac php --version there is only version of php not version php with xdebug only version of php

$ php --version
PHP 7.2.8 (cli) (built: Aug 28 2018 16:32:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

help me i doo all things what i should but it not work correctly help thx

1
  • xdebug ususally us loaded as an extension to php, so it is not built into the php engine but loaded at runtime. Have a try using the phpinfo() function to find out what modules are actually loaded into your engine and modify the php settings to adjust that. Commented Oct 6, 2018 at 18:33

1 Answer 1

1

With the migration to Homebrew-core the php formula has stopped taking over the role of PECL. Installing xdebug can (and should) be done through PECL (https://pecl.php.net/package/xdebug).

pecl update-channels

pecl list-all

pecl install xdebug

or upgrade it

pecl upgrade xdebug

After that you'd need to update your php.ini with a line to specify xdebug's location, as suggested on xdebug.org:

zend_extension="/usr/local/php/modules/xdebug.so"

Additionally, you may need to put in there some settings for xdebug, for example:

xdebug.collect_vars=1
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_port=9005

Source: http://www.artemdwo.com/install-php72-and-xdebug-on-mac-os-x

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.