mamp - Xdebug 错误的 Zend API 版本号

标签 mamp xdebug

我在升级 MAMP 的 xdebug 时遇到问题。我运行的是 2.2.0 版本,遇到了一个已知问题:PhpStorm and Xdebug not breaking in Symfony2 Controller

我尝试按照http://xdebug.org/wizard.php中的说明升级到版本2.2.3

下载并解压 xdebug tar 后,我运行了 /Applications/MAMP/bin/php/php5.4.4/bin/phpize

这是输出:

Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525

然后我将modules/xdebug.so文件复制到mamp php5.4.4扩展目录中:`/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts- 20100525/xdebug。

如果我运行 /Applications/MAMP/bin/php/php5.4.4/bin/php -v 我会得到以下内容:

Xdebug requires Zend Engine API version 220090626.
The Zend Engine API version 220100525 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.

PHP 5.4.4 (cli) (built: Jul  4 2012 17:28:56)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

我已经重新启动了 MAMP 和 Apache,并尝试使用 phpinfo() 加载页面,但没有看到列出的 Xdebug。如果我将旧的 xdebug.so 文件移回原位,错误将被删除,并且 phpinfo() 显示 xdebug 已启用

最佳答案

我设法通过运行解决了这个问题

/Applications/MAMP/bin/php/php5.4.4/bin/pecl install xdebug 起初,我发现使用 pecl 的 Zend API 编号存在问题。我关注了这篇文章:pecl installs for previous php version并设置以下内容:

sudo /Applications/MAMP/bin/php/php5.4.4/bin/pear config-set php_ini /Applications/MAMP/bin/php/php5.4.4/conf/php.ini
sudo /Applications/MAMP/bin/php/php5.4.4/bin/pecl config-set bin_dir /Applications/MAMP/bin/php/php5.4.4/bin/

不确定这些配置是否与之前的失败有关

关于mamp - Xdebug 错误的 Zend API 版本号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20415789/

相关文章:

windows - PhpStorm Xdebug : Port 9000 is busy, 还设置在端口 63342

python - MAMP Python-MySQLdb 问题 : Path to libssl. 1.0.0.dylib 在调用 Python 文件后更改

php - 如何在 PHP (MAMP) 中启用错误报告?

php - 我可以让 xdebug 停止\中断异常吗? (Ubuntu/Netbeans IDE/PHP 5.4/CLI/xdebug)

xdebug var_dump 函数颜色

php - 远程服务器的 Xdebug 未连接

MySQL - 错误 1045,访问被拒绝

php - 在 MAMP 上安装 Mongo 驱动程序

mysql - 在 3306 端口上的 MAMP 上运行 MySQL 有什么好处?

php - 使用 Xdebug 调试 Codeception 测试