View Issue Details

IDProjectCategoryView StatusLast Update
0002246XdebugStep Debuggingpublic2024-02-23 12:09
Reportervlad.babayan Assigned To 
PriorityurgentSeverityblockReproducibilityalways
Status newResolutionopen 
PlatformAMD64OSWindows 11OS Version22H2
Product Version3.3.1 
Summary0002246: Nginx + PHP-FPM 8.1.27 with Xdebug 3.3.1 502 Bad Gateway Error
Description

I have an Ubuntu 22.04 VirtualBox VM, with Docker installed on it with 2 containers - nginx:latest configured for fastcgi_pass and php-fpm:8.1.27-fpm. There is a simple 'Hello World' index.php. When I make a GET request with Postman to Nginx container, it gives 502 bad gateway error (with Xdebug 3.3.1). When I downgrade to Xdebug 3.2.2, it gives 200 OK.

Steps To Reproduce

Provision an Ubuntu 22.04 VM, Install Docker on it, run Nginx and PHP-FPM containers, configure them, install Xdebug on PHP-FPM container, make GET requests with Postman or even via browser.

Additional Information

php -v
PHP 8.1.27 (cli) (built: Feb 1 2024 03:02:44) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.27, Copyright (c) Zend Technologies
with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans

########

php.ini # (Xdebug Part)

########

[xsl]
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so
extension=timezonedb.so
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=5
opcache.fast_shutdown=1
opcache.enable_cli=1

[XDebug]
xdebug.mode=debug
xdebug.discover_client_host=On
xdebug.client_port=9000
xdebug.var_display_max_data=-1
xdebug.var_display_max_children=-1

###########

Nginx Conf

###########

server {
listen 0.0.0.0:80;
root /var/www/html;
location / {
index index.php index.html;
}
location ~ .php$ {
include fastcgi_params;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
}

Tagsphp8.1, xdebug
Operating SystemWindows 11 22H2
PHP Version8.1.10-8.1.19

Activities

incon

2024-02-23 06:10

reporter   ~0006851

I had the same issue with PHP 8.1 and Xdebug 3.3.1 on an M2 Macbook Pro. Downgrading to 3.2.2 has worked for me also.
More information on my issue and be found here https://github.com/nicoverbruggen/phpmon/discussions/280

RiseAndCry

2024-02-23 09:30

reporter   ~0006852

same issue as well (PHP 8.1, Xdebug 3.3.2, M2 Macbook Pro), only when listening to xdebug connections (PhpStorm), downgrading to 3.2.2 worked.

RiseAndCry

2024-02-23 09:40

reporter   ~0006853

Xdebug 3.3.1* :)

vlad.babayan

2024-02-23 12:09

reporter   ~0006854

The latest working version is 3.3.0alpha2, starting from 3.3.0alpha3 there is this problem.

Issue History

Date Modified Username Field Change
2024-02-12 18:08 vlad.babayan New Issue
2024-02-12 18:08 vlad.babayan Tag Attached: php8.1
2024-02-12 18:08 vlad.babayan Tag Attached: xdebug
2024-02-23 06:10 incon Note Added: 0006851
2024-02-23 09:30 RiseAndCry Note Added: 0006852
2024-02-23 09:40 RiseAndCry Note Added: 0006853
2024-02-23 12:09 vlad.babayan Note Added: 0006854