K
K
knowledge2019-03-30 15:53:29
xdebug
knowledge, 2019-03-30 15:53:29

How to overcome an error in docker when connecting xdebug?

I use docker, in docker-compose I forward xdebug settings

environment:
      XDEBUG_CONFIG: "remote_enable=1 remote_host=192.168.220.1 remote_port=9001 idekey=PHPSTORM remote_autostart=1"
      PHP_IDE_CONFIG: "serverName=docker"

error pops up Warning: Header may not contain NUL bytes in /app/public/index.php on line 10
the error appears the first time you use echo or print
so I understand before the headers what information is displayed
if the line XDEBUG_CONFIG: "remote_enable=1 remote_host=192.168. 220.1 remote_port=9001 idekey=PHPSTORM comment out, then the error disappears the
error appeared after updating docker, on the previous version this was not
version docker 18.09.1
​​docker-compose 1.21.0
php 7.3
nginx 1.15

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-03-30
@knowledge

What about xdebug version?
Version >= 2.7.0 had a fix for this bug.
Try putting the value of each variable in single quotes if it's not the xdebug version

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question