php – 使用MAMP在Mac OSX上构建/安装XDebug

我在使用MAMP在Mac OSX上构建/安装XDebug时遇到问题.

到目前为止,我在网上广泛搜索,目前我被困在XDebug“安装向导”的一部分,告诉我在我下载的源代码上“运行:PHPize”.

当我运行PHPize时,我收到以下消息:

new-host-2:xdebug-2.2.0 Dima$PHPize
grep: /usr/include/PHP/main/PHP.h: No such file or directory
grep: /usr/include/PHP/Zend/zend_modules.h: No such file or directory
grep: /usr/include/PHP/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:        
Zend Module Api No:     
Zend Extension Api No:  
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then,rerun this script.

如果我做了一个PHPize我得到:

new-host-2:xdebug-2.2.0 Dima$which PHPize
/usr/bin/PHPize

这不是我想要使用的版本,我想使用MAMP安装的PHPize版本我假设因为我想在MAMP版本的PHP上安装XDebug.这很令人费解,因为我已将MAMP特定的PHP bin路径添加到我的.bash_profile已经进入$PATH变量.

如果我运行echo $PATH我得到:

new-host-2:xdebug-2.2.0 Dima$echo $PATH
/opt/local/bin:/opt/local/sbin:/Applications/MAMP/bin/PHP/PHP5.4.3/bin:/Users/Dima/.rvm/gems/ruby-1.9.2-p290/bin:/Users/Dima/.rvm/gems/ruby-1.9.2-p290@global/bin:/Users/Dima/.rvm/rubies/ruby-1.9.2-p290/bin:/Users/Dima/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

MAMP特定的PHP路径显示在’/usr/bin’之前.我试过的下一件事是运行MAMP特定的PHPize,手动提供整个路径,如下所示:

new-host-2:xdebug-2.2.0 Dima$/Applications/MAMP/bin/PHP/PHP5.4.3/bin/PHPize 
-bash: /Applications/MAMP/bin/PHP/PHP5.4.3/bin/PHPize: Permission denied

现在我在Finder中检查了这些文件的权限,它表明我拥有读取和写入此文件文件的完全权限.我有点失落.任何帮助将非常感激.如果有助于诊断此问题,我可以发布任何其他信息.

有同样的问题,但找到了更好的解决方

xDebug已经在MAMP中.

检查你的PHP.ini

/Applications/MAMP/conf/PHP5.x/PHP.ini

一路走下去.你会看见

[xdebug]
;zend_extension="/Applications/MAMP/bin/PHP5.X/lib/PHP/extensions/no-debug-non-zts-20090626/xdebug.so"

改变成

[xdebug]
zend_extension="/Applications/MAMP/bin/PHP5.X/lib/PHP/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

重启服务器…完成!

http://danpolant.com/want-to-run-xdebug-mamp-is-the-easiest-way/

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...