Dumb question I think, but I have PHP 5.6.14 running on El Capitan.
I have installed xdebug with
brew install php56-xdebug
But there is no mention of xdebug in phpinfo
phpinfo reveals:
Configuration File (php.ini) Path: /etc
When I run brew install php56-xdebug again, I get
homebrew/php/php56-xdebug-2.3.3 already installed
So I'm guessing that brew has installed xdebug on a path (where?) which is for a different version of PHP which I'm not actually running.
Can somebody help me understand what brew has done, and how I can configure the version of PHP that I'm running to include xdebug.
OK, so I fixed this. Any comments welcome on whether I did it right.
1) Found where the brew install of php is using
brew info php56
This reports:
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so
Update version of php loaded by apache:
sudo nano /etc/apache2/httpd.conf
Replaced
LoadModule php5_module libexec/apache2/libphp5.so
with
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so
For those who use different version of php type in terminal
--> brew search xdebug
and choose yours version.
after installing your version of xdebug you've to active it by placing the installed extension path to your php.ini file.
print your phpinfo() and look for "Loaded Configuration File".
Open the file shown for "Loaded Configuration File" ( mine is /etc/php.ini ) and paste extension path anywhere you like.
for me the xdebug installed extension path is "/usr/local/Cellar/php56-xdebug/2.5.1/xdebug.so"
so i pasted {zend_extension="/usr/local/Cellar/php56-xdebug/2.5.1/xdebug.so"}.
restart your apache server and check your phpinfo() for xdebug, thats all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With