Whether I install via homebrew:
brew install homebrew/php/php70-xdebug
or compile from source located at http://xdebug.org using either just ./configure
or the following:
./configure --enable-xdebug CC="gcc -arch i386" CXX="g++ -arch i386"
make
I still receive the following when running php7 that is bundled with Acquia DevDesktop:
Failed loading /Applications/DevDesktop/php7_0/ext/xdebug.so: dlopen(/Applications/DevDesktop/php7_0/ext/xdebug.so, 9): no suitable image found. Did find:
/Applications/DevDesktop/php7_0/ext/xdebug.so: mach-o, but wrong architecture
Things I have confirmed:
which php
returns /Applications/DevDesktop/php7_0/bin/phpphp -i
shows the correct .ini file (/Applications/DevDesktop/php7_0/bin/php.ini) and no otherszend_extension="/Applications/DevDesktop/php7_0/ext/xdebug.so"
is in the php.iniThe full message php --version
returns is:
$ php --version
Failed loading /Applications/DevDesktop/php7_0/ext/xdebug.so: dlopen(/Applications/DevDesktop/php7_0/ext/xdebug.so, 9): no suitable image found. Did find:
/Applications/DevDesktop/php7_0/ext/xdebug.so: mach-o, but wrong architecture
PHP 7.0.4 (cli) (built: Mar 18 2016 02:12:27) ( ZTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
The OS is a brand-new install of Mac OS 10.11.5 on a MacBook Air.
Does anyone know why is it complaining about the wrong architecture?
This is what worked for me for DevDesktop:
cd xdebug-2.5.5
/Applications/DevDesktop/php7_0/bin/phpize
and now the step that was the one that caused most grief figuring out...
./configure --with-php-config=/Applications/DevDesktop/php7_0/bin/php-config CC="gcc -arch i386" CXX="g++ -arch i386"
make
$ cp modules/xdebug.so /Applications/DevDesktop/php7_0/ext/
open the php7_0/bin/php.ini
file and (assuming it is the default) replace:
zend_extension="/Applications/DevDesktop/php5_6/ext/opcache.so"
with
;zend_extension="/Applications/DevDesktop/php5_6/ext/opcache.so"
[Xdebug]
zend_extension="/Applications/DevDesktop/php7_0/ext/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
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