[2.0.3] FPM is started with -c pointing at the scanned ini dir, so php.ini is parsed twice ("Cannot load Xdebug - it was already loaded")

未关闭
#1,797 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
22/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
php
领域
devops

调研方向

Start from the reproduction steps: run php83-fpm -t -y on config/fpm/8.3-fpm.conf with and without -c pointing at config/php/83/php.ini, and compare with -i output. The payload does not show the Herd source that launches FPM, so locate where the -c flag is added in 2.0.3. Done means FPM starts without the duplicate Xdebug 'already loaded' message in Herd_Debug.log, and the php.ini is still applied once.

由索引模型根据 Issue 内容生成。

描述

macOS

Herd version: 2.0.3
macOS: 26 (Darwin 25.6.0), Apple Silicon

What happens

Herd_Debug.log shows, for every FPM version at startup:

Process FPM-8.3 error: Cannot load Xdebug - it was already loaded
Cause

Herd's PHP binaries are compiled with the scan dir
~/Library/Application Support/Herd/config/php/83/, which contains php.ini.
2.0.3 now also starts FPM with -c pointing at that same php.ini, so the file is
loaded twice: once as the main config, once as a scanned additional .ini.
Any zend_extension= line in it (here, Xdebug enabled through Herd) fails the
second time.

Reproduce
H=~/Library/Application\ Support/Herd
"$H/bin/php83-fpm" -t -y "$H/config/fpm/8.3-fpm.conf"
# clean
"$H/bin/php83-fpm" -t -y "$H/config/fpm/8.3-fpm.conf" -c "$H/config/php/83/php.ini"
# Cannot load Xdebug - it was already loaded

php83-fpm -c .../php.ini -i reports both
Loaded Configuration File => .../config/php/83/php.ini and
Additional .ini files parsed => .../config/php/83/php.ini.

The CLI binary does not pass -c and loads the file once.

Impact

Xdebug still ends up loaded once and the other directives are applied twice with the
same values, so it is mostly noise in the log. But the double parse is unintended
and could break with non-idempotent directives.

主要语言
没有语言数据
星标
124
派生
1
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

beyondcode/herd-community 的其他 Issue

查看 beyondcode/herd-community 的全部 Issue

相似的 Issue

更多 DevOps Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。