Skip to content

Xdebug extension not enabled on PHP 8.3 suffix 6 (Debian 13/trixie) images #246

@krisvanderven

Description

@krisvanderven

Bug Report

What happened

When using PHP 8.3 with xdebug: "debug,develop,trace" in .lando.yml, Xdebug is not loaded into PHP, but Lando still sets the XDEBUG_CONFIG environment variable (including log=/tmp/xdebug.log). This results in startup warnings:

Xdebug: [Log Files] File '/tmp/xdebug.log' could not be opened.
Xdebug: [Log Files] File '/tmp/xdebug.log' could not be opened.

And php -v confirms Xdebug is not loaded:

PHP 8.3.30 (cli) (built: Feb 24 2026 19:14:59) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.30, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.30, Copyright (c), by Zend Technologies

Root cause

The xdebug.so file is present at /usr/local/lib/php/extensions/no-debug-non-zts-20230831/xdebug.so, but no docker-php-ext-xdebug.ini file is created in /usr/local/etc/php/conf.d/. All other extensions (apcu, bcmath, redis, etc.) do have their ini files.

Meanwhile, xxx-lando-default.ini does configure Xdebug settings (xdebug.mode, xdebug.start_with_request, etc.) and XDEBUG_CONFIG is set in the environment — but the extension itself is never loaded via zend_extension=xdebug.so.

Environment

  • Lando: v3.26.2
  • PHP: 8.3.30
  • Image base: Debian 13 (trixie) — suffix 6
  • Xdebug .so: exists at /usr/local/lib/php/extensions/no-debug-non-zts-20230831/xdebug.so
  • docker-php-ext-xdebug.ini: missing

Comparison

The same .lando.yml config with xdebug: "debug,develop,trace" on PHP 8.2 (Debian 12 / suffix 5 image) works correctly — Xdebug is loaded and no warnings appear.

.lando.yml

name: myapp
recipe: wordpress
config:
  php: "8.3"
  via: nginx
  webroot: web
  xdebug: "debug,develop,trace"

Related

This may be related to #92 — both issues stem from Lando's Xdebug configuration not aligning with the actual state of the extension in the container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions