lando / lando/php

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

Open
#246 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
20
Forks
18
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

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

Inspect the PHP 8.3 Debian 13/trixie suffix 6 image configuration that should create /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini, and compare it with the working PHP 8.2 suffix 5 image. Verify that the Xdebug extension is loaded by php -v and that the startup warnings disappear when xdebug is enabled through .lando.yml.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, php
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.