4

我在 OS 10.11 上使用 xampp5.6.15。我按照此说明安装 xDebug。我的“量身定制的安装说明”如下: 在此处输入图像描述

在这个指令中,它没有提到将下载的 tgz 文件放在哪里,所以我只是将它放在downloads文件夹中的位置,在我运行之后phpize,输出是这样的:

grep:/usr/include/php/main/php.h:没有这样的文件或目录 grep:/usr/include/php/Zend/zend_modules.h:没有这样的文件或目录 grep:/usr/include/php/Zend /zend_extensions.h:没有这样的文件或目录配置:PHP Api 版本:
Zend 模块 Api 编号:
Zend 扩展 Api 编号:
找不到 autoconf。请检查您的 autoconf 安装和 $PHP_AUTOCONF 环境变量。然后,重新运行此脚本。

我想这是因为 xdebug 文件夹不在正确的位置,我尝试将它移动到xamppfiles/andxamppfiles/modules/和其他一些地方,但没有任何效果。

那么有什么问题呢?我应该把文件夹放在哪里?

4

4 回答 4

5

在 xdebug 源目录中提供 XAMPP php 二进制文件的完整路径:

$ cd xdebug-2.5.0
$ /Applications/XAMPP/xamppfiles/bin/phpize
$ ./configure --enable-xdebug --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config
$ make

接下来将 modules\xdebug.so 放到 Extensions 目录(参见定制的安装说明)。

于 2017-01-21T00:25:11.907 回答
1

也许您可以解决以下问题:

1. cd xdebug-2.5.4
2./Applications/XAMPP/xamppfiles/bin/phpize

如果您没有自制软件,请安装:<a href="https://brew.sh/" rel="nofollow noreferrer">https://brew.sh/

3. brew install autoconf
4../configure --enable-xdebug --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config

不要忘记运行 'make test':
5. make
6. make test
7.cp modules/xdebug.so /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012

编辑 /Applications/XAMPP/xamppfiles/etc/php.ini:
8. 9.vi /Applications/XAMPP/xamppfiles/etc/php.ini
并添加以下行:
zend_extension = /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so

10.重新启动您的网络服务器。

我希望这种方法对您有所帮助。

于 2017-05-31T02:56:22.313 回答
1

当我尝试运行 phpize 来安装 xdebug 时,我只是在为同样的问题苦苦挣扎并收到以下消息。就我而言,解决方案(和问题)是我刚刚没有安装 XAMPP 开发人员文件!当您运行 XAMPP 安装程序时,您可以选中或取消选中此选项。如果您最初没有检查它,只需再次运行安装程序,它允许您只添加开发人员文件。

为了完整起见:我还遇到了错误版本的 php / phpize 的问题(使用了旧的 OSX 版本),所以我还必须设置存储 XAMPP 版本的 php、phpize 等的路径:

export PATH=/Applications/XAMPP/xamppfiles/bin/:$PATH

之后,一切都很好,我可以按照 XDEBUG 向导给我的步骤操作:https ://xdebug.org/wizard.php

这是我通过 runnin phpize 得到的原始错误消息:

grep:/Applications/XAMPP/xamppfiles/include/php/main/php.h:没有这样的文件或目录
grep:/Applications/XAMPP/xamppfiles/include/php/Zend/zend_modules.h:没有这样的文件或目录
grep: /Applications/XAMPP/xamppfiles/include/php/Zend/zend_extensions.h:没有这样的文件或目录
配置:
PHP Api版本:
Zend Module Api No:
Zend Extension Api No:

于 2018-04-28T11:35:12.707 回答
0

我认为您缺少两件事:

  • PHP 源代码

我不知道 XAMPP,所以在这里我无能为力。也许 PHP 源代码是用 XAMPP 打包的,看看。

  • 自动配置

尝试安装 autoconf

brew install autoconf
于 2016-05-17T08:29:32.640 回答