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

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了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/

脚本宝典总结

以上是脚本宝典为你收集整理的php – 使用MAMP在Mac OSX上构建/安装XDebug全部内容,希望文章能够帮你解决php – 使用MAMP在Mac OSX上构建/安装XDebug所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。