php / php/php-src

Building `--with-fpm` without `--prefix` adds `NONE` to include path in `php-fpm.conf.default`

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

@bukka 已经在做这个了。

开始于 2026年1月6日。

Bug Category: Build System SAPI: fpm Status: Needs Triage
主要语言
C
星标
40.4k
派生
8.1k
平均合并
2 天 13 小时
30 天内合并 PR
96

描述

Description

There's a small bug while building php-fpm, but with no prefix definition. After build process you get an /usr/local/etc/php-fpm.conf.default, but the include path is wrong;

# current
include=NONE/etc/php-fpm.d/*.conf

# should
include=/usr/local/etc/php-fpm.d/*.conf

To solve this, you can simply run ./configure with --prefix=/usr/local flag.

I searched a bit in the code & think there's a missing default setting in C, but I'm too stupid for that language :-) Found out following lines of code, may this will help a bit for faster debugging :-)
https://github.com/php/php-src/blob/master/sapi/fpm/php-fpm.conf.in#L142
https://github.com/php/php-src/blob/master/sapi/fpm/config.m4#L502
https://github.com/php/php-src/blob/master/main/build-defs.h.in#L28

PS: There's an old workaround in current official docker images for that, seems they were too frustrated a) trying a rebuild with prefix flag & b) opening an issue :D
https://github.com/docker-library/php/blob/master/8.5/alpine3.23/fpm/Dockerfile#L211
PS²: Is it possible to generate the config-files without ´.default` suffix? :)

PHP Version
even before php8 era
Operating System

No response

贡献指南

打开贡献指南

从这里开始

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

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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