View Issue Details

IDProjectCategoryView StatusLast Update
0002153XdebugInstallationpublic2023-05-24 14:29
ReporterOxCom Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
PlatformLinuxOSUbuntuOS VersionUbuntu 22.04 LTS
Product Version3.2.0 
Summary0002153: xdebug.mode in PHP-FPM pool ignored
Description

The xdebug configuration use only global/default value for xdebug.mode settings and ignore php-fpm pools configuration

Steps To Reproduce
  1. Configure custom pool (e.g. awesome):

; Start a new pool.
; the variable $pool can we used in any directive and will be replaced by the
; pool name:
[xdebug-awesome]

user = www-data
group = www-data

listen = /run/php/php8.1-$pool-fpm.sock

listen.owner = www-data
listen.group = www-data

pm = dynamic
pm.max_children = 80
pm.start_servers = 5
pm.min_spare_servers = 3
pm.max_spare_servers = 35

php_admin_value[xdebug.mode] = debug
php_admin_value[xdebug.start_with_request] = yes
php_admin_value[xdebug.idekey] = key-$pool
php_admin_value[xdebug.client_host] = 127.0.0.1
php_admin_value[xdebug.client_discovery_header] = ""

  1. make sure that no other configuration has been provided for xdebug in PHP config files
  2. Configure simple setup with php-fpm to serve index.php with 'xdebug-awesome' pool
  3. Add phpinof(); in index.php and check settings:
    • xdebug.mode = debug
    • only development helpers feature is enabled
TagsNo tags attached.
Attached Files
xdebug-only-pool-configured.png (150,389 bytes)   
xdebug-only-pool-configured.png (150,389 bytes)   
Operating System
PHP Version8.1.10-8.1.19

Activities

OxCom

2023-02-08 18:04

reporter   ~0006514

Example in the php-xdebug-2153.zip file. Run docker-compose up and visit the page on port 8812

php-xdebug-2153.zip (2,350 bytes)

derick

2023-05-24 14:29

administrator   ~0006560

This is expected, and correct behaviour. xdebug.mode can only be set when PHP starts, due to the way it initialises and register its features with the PHP engine.

I have updated the documentation to make this clearer too:
https://xdebug.org/docs/install#mode

An alternative would be to set up two PHP-FPM servers, each with a different port/socket, and their own PHP configuration through separate php.ini files.

Issue History

Date Modified Username Field Change
2023-01-11 14:39 OxCom New Issue
2023-01-11 14:39 OxCom File Added: xdebug-only-pool-configured.png
2023-02-08 18:04 OxCom Note Added: 0006514
2023-02-08 18:04 OxCom File Added: php-xdebug-2153.zip
2023-05-24 14:29 derick Assigned To => derick
2023-05-24 14:29 derick Status new => resolved
2023-05-24 14:29 derick Resolution open => no change required
2023-05-24 14:29 derick Note Added: 0006560