在 Mac 上使用 XAMPP 安装 XDebug for PHP

2024-03-06

我有一台安装了全新 OSX Mojave 的 Mac。我下载了 XAMPP (7.3) 并安装。本地 Apache Web 服务器正常工作,我从仪表板获得的 PHPInfo() 显示了 php.ini 文件的所有正确信息,即 /Applications/XAMPP/xamppfiles/etc/php.ini。

我已获取 PHPInfo 的副本并将其放入向导中:

https://xdebug.org/wizard.php https://xdebug.org/wizard.php

说明看起来很简单。我确实必须先使用 homebrew 安装 autoconf。

但后来我能够下载并解压 /Applications/XAMPP/xamppfiles/ 文件夹中的 xdebug-2.6.1.tgz。

我更改了 $PATH 变量,使 /Applications/XAMPP/xamppfiles/bin 成为搜索的第一个路径,以便正确的 phpize 运行。

我更改为 /Applications/XAMPP/xamppfiles/xdebug-2.6.1 文件夹并运行 phpize,然后运行 ​​./configure。一切似乎都运行良好,没有发现任何错误。

但是当我运行“make”命令时出现错误。这是我得到的输出:

> Terrys-MacBook-Pro:xdebug-2.6.1 terry$ make /bin/sh
> /Applications/XAMPP/xamppfiles/xdebug-2.6.1/libtool --mode=compile cc 
> -I. -I/Applications/XAMPP/xamppfiles/xdebug-2.6.1 -DPHP_ATOM_INC -I/Applications/XAMPP/xamppfiles/xdebug-2.6.1/include -I/Applications/XAMPP/xamppfiles/xdebug-2.6.1/main -I/Applications/XAMPP/xamppfiles/xdebug-2.6.1 -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /Applications/XAMPP/xamppfiles/xdebug-2.6.1/xdebug_compat.c -o
> xdebug_compat.lo   cc -I.
> -I/Applications/XAMPP/xamppfiles/xdebug-2.6.1 -DPHP_ATOM_INC -I/Applications/XAMPP/xamppfiles/xdebug-2.6.1/include -I/Applications/XAMPP/xamppfiles/xdebug-2.6.1/main -I/Applications/XAMPP/xamppfiles/xdebug-2.6.1 -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Applications/XAMPP/xamppfiles/xdebug-2.6.1/xdebug_compat.c 
> -fno-common -DPIC -o .libs/xdebug_compat.o /Applications/XAMPP/xamppfiles/xdebug-2.6.1/xdebug_compat.c:56:71:
**> error: too few arguments to function call, expected 6, have 5**
>         return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);
>                ~~~~~~~~~~~~~~~~~                                             ^
> /Applications/XAMPP/xamppfiles/include/php/Zend/zend_execute.h:330:1:
> note: 'zend_get_zval_ptr' declared here ZEND_API zval
> *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type); ^ /Applications/XAMPP/xamppfiles/include/php/main/php_config.h:9:19:
> note: expanded from macro 'ZEND_API'
> # define ZEND_API __attribute__ ((visibility("default")))
>                   ^ /Applications/XAMPP/xamppfiles/xdebug-2.6.1/xdebug_compat.c:194:88:
> error: too few arguments to function call, expected 9, have 8
>         php_setcookie(name_s, value_s, expires, path_s, domain_s, secure, url_encode, httponly);
>         ~~~~~~~~~~~~~                                                                         ^ /Applications/XAMPP/xamppfiles/include/php/ext/standard/head.h:40:1:
> note: 'php_setcookie' declared here PHPAPI int
> php_setcookie(zend_string *name, zend_string *value, time_t expires,
> zend_string *path, zend_string *domain, int secure, int httponly,
> zend_string *samesite, int url_encode); ^
> /Applications/XAMPP/xamppfiles/include/php/main/php.h:72:18: note:
> expanded from macro 'PHPAPI'
> #               define PHPAPI __attribute__ ((visibility("default")))
>                               ^ 2 errors generated. make: *** [xdebug_compat.lo] Error 1

因此,我在“make”命令中看到的第一个错误是“>错误:函数调用的参数太少,预期为 6,实际有 5”。

我不知道从这里该去哪里。我读过的无数文档似乎要么是针对 PC 的,要么是针对 PHP 5 的。


这有一个错误。链接是这样的:https://bugs.xdebug.org/view.php?id=1593 https://bugs.xdebug.org/view.php?id=1593

这说明您现在需要使用Xdebug 2.7.0beta1。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 Mac 上使用 XAMPP 安装 XDebug for PHP 的相关文章

随机推荐

  • Chrome devtool本地存储信息未及时更新

    Chrome版本 103 0 5060 134 arm64 Before LocalStorage和SessionStorage跟随页面js运行实时更新 Now 需要手动切换devtools选项卡或者点击devtools左上角刷新按钮来查看
  • 正则表达式类型之间的差异

    我正在读 GNU find的手册页并偶然发现了这个开关 regextype type Changes the regular expression syntax understood by regex and iregex tests wh
  • MsiOpenProduct 是从已安装产品读取属性的正确方法吗?

    给定 MSI 产品代码 我想从已安装的产品中获取升级代码 以及其他属性 我通过调用 MsiOpenProduct 方法 然后调用 MsiGetProductProperty 来尝试此操作 一个 缩写 示例如下所示 MSIHANDLE han
  • Node.js/Express.js 将 POST 请求转发到另一个域

    我的 express js 应用程序在域上有一条路由example1 com router post messages add req res gt let message new Message message title req bod
  • 在上传到服务器之前使用 Canvas 调整 Iphone 图像的大小

    在上传到我们的服务器之前 我们使用 Canvas 在 Iphone IPAD 上调整图像大小 在 iPhone 4S 和 5 上 当使用前置摄像头以横向模式拍摄照片时 调整大小效果很好 当以肖像模式拍摄时 图像会被压缩约 1 4 但当使用后
  • 通过js获取WebView中的位置

    我正在尝试创建 WebView 它将通过 js 获取 GPS 本地化 但是当我单击应该显示本地化的按钮时 在android 4 1 1 模拟器 中 错误代码2 无法启动地理定位服务 在 android 4 1 2 phone 中什么也没有发
  • 如何在 ASP.NET Core 中获取 SignalR Hub 上下文?

    我正在尝试使用以下命令获取集线器的上下文 var hubContext GlobalHost ConnectionManager GetHubContext
  • 如何获取“未过滤”的数组项?

    假设我有一个数组 我通过调用来过滤它myItems filter filterFunction1 并从中获取一些物品 然后我想运行另一个过滤功能filterFunction2与未被选中的其余项目filterFunction1 是否可以获取调
  • 在VHDL中将8位二进制数转换为BCD

    该算法众所周知 您进行 8 次左移 并在每次移位后检查个位 数十位或数百位 每个 4 位 如果它们超过 4 个 则将 3 个添加到该组中 依此类推 这是一个基于流程的解决方案 但不起作用 它会编译 但输出不是我想要的 有什么想法可能是什么问
  • wp_nav_menu 更改子菜单类名称?

    有没有办法改变孩子 ul class sub menu WordPress 本身生成自定义类名 我认识家长 ul 您可以删除或更改名称 menu class gt newname 我找不到答案 我试过 submenu class gt cu
  • 将 APK 发布到 Play 商店时出现构建版本问题

    我看过很多答案 但大多数都已经过时了 我正在尝试使用 Azure DevOps 管道将我的 Android 应用程序发布到 Play 商店 我遇到了 APK 版本代码的问题 出现以下错误 APK指定已使用的版本代码 任何人都知道如何增加存在
  • Tensorflow:每类 IOU

    我正在尝试使用 deeplab 进行语义分割 我想计算每个班级的 IOU 仅针对个人的 IOU 而不是平均 IOU 在 L142 处https github com tensorflow models blob master researc
  • 为什么当 Visual Studio 打开时,智能感知和代码建议停止工作?

    我在 Microsoft 中遇到 Intellisense 问题视觉工作室2012 http en wikipedia org wiki Microsoft Visual Studio Visual Studio 2012 我将在一个项目中
  • 嵌套索引路由未在react-router-dom v6中呈现

    我有一个安装了react router dom v6 的create react app 项目 尝试使用新的索引路由语法 以便我的 HomePage 组件在当前为布局组件提供服务的索引处呈现 当我导航到索引 http localhost 3
  • 在 OkHttp java 中创建承载授权标头

    我需要使用OkHttp3在java中作为HTTP客户端并在请求中发送授权标头 example 授权 持票人 eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9 eyJpc3MiOiJodHRaswczovL2F1dGg
  • 通过segue传递数据

    我正在使用tableview 控制器和detailView 做简单的iOS 应用程序 我想要的只是通过 segue 传递数据 这就是它的样子 我想要的是 您单击 Mark za 它将打开 URL 视频编号 1 如果您单击 TV JOJ 它将
  • 在 beforeSend 上停止 $.ajax

    我有这个 jQuery ajax 调用 ajax url my action dataType script beforeSend function if 1 1 just an example return false complete
  • 转换为具有相同数据成员布局但实现不同的类是否安全?

    第一个类将用于私有继承 以确保布局完全相同 这应该可以保证铸造安全 include
  • Angular 构建无法在服务器上运行

    我正在尝试在服务器上运行我的 AngularJS 前端 我正在使用 Yeoman 来构建应用程序 我上传了非常基本的 hello world 应用程序 并获得了未加载 JavaScript 的纯 HTML 文本 Chrome 中的控制台是这
  • 在 Mac 上使用 XAMPP 安装 XDebug for PHP

    我有一台安装了全新 OSX Mojave 的 Mac 我下载了 XAMPP 7 3 并安装 本地 Apache Web 服务器正常工作 我从仪表板获得的 PHPInfo 显示了 php ini 文件的所有正确信息 即 Application