[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 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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.

主要言語
言語のデータがありません
スター
125
フォーク
1
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

beyondcode/herd-community のほかの issue

beyondcode/herd-community の issue をすべて見る

似ている issue

DevOps の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。