php – MAC OS El Capitan 10.11:安装XDEBUG

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了php – MAC OS El Capitan 10.11:安装XDEBUG脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在寻找调试 PHP脚本的方法.在互联网上我找到了可以用MacGDBp XDebug做的信息.
当我在Shell中使用PECL进行安装时:

sudo pecl install xdebug

The next error have been occured:

downloading xdebug-2.4.0.tgz ...

Starting to download xdebug-2.4.0.tgz (264,832 bytes)
.....................done: 264,832 bytes

76 source files,building
running: 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.

帮我找到解决问题的方法.

解决方法

XDebug认可用.只需启用它

1)sudo nano /etc/PHP.ini(如果该文件尚不存在,则首先是sudo cp /etc/PHP.ini.default /etc/PHP.ini)

2)在末尾添加这些行(使用ls ls /usr/lib / PHP / extensions /验证路径)

[Xdebug]
zend_extension="/usr/lib/PHP/extensions/no-debug-non-zts-20121212/xdebug.so"

3)使用sudo apachectl restart重启apache

4)通过PHP -m |验证grep xdebug

脚本宝典总结

以上是脚本宝典为你收集整理的php – MAC OS El Capitan 10.11:安装XDEBUG全部内容,希望文章能够帮你解决php – MAC OS El Capitan 10.11:安装XDEBUG所遇到的问题。

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

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