php / php/php-src

php_value[xxx] in php-fpm pool - first declaration wins

Open
#8,398 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Bug SAPI: fpm
Dominant language
C
Stars
40.4k
Forks
8.2k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

The following code:


[www]
; ...
pm.start_servers = 5
pm.start_servers = 6

php_value[default_socket_timeout] = 61
php_value[default_socket_timeout] = 62

Resulted in this result:

pm.start_servers = 6
php_value[default_socket_timeout] = 61

But I expected this output instead:

pm.start_servers = 6
php_value[default_socket_timeout] = 62

Note, with php_value entries, the first declaration wins and with other directives, the last declared value wins. This behavior of php_value entries is inconsistent with the way the rest of the php configuration files operation.

This appears to function contrary to the php-fpm configuration documentation which reads:

PHP settings passed with php_value or php_flag will overwrite their previous value.

PHP Version

7.4

Operating System

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source file or test. Start by reproducing the duplicate php_value declarations in a PHP-FPM pool configuration and trace the configuration handling for php_value versus pm.start_servers. Done means the later php_value declaration wins consistently with the documented behavior, with coverage for duplicate declarations.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.