Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Warning

The configured host and port must be reachable from with in the container, see check below.


Note
titlehost-config mixed

Why do you use "172.18.0.1" in your .env file, and not same value as the preset in .yml-file "host.docker.internal".
And which of these values must be changed when working in a different location?
The one in the .env-file I guess. And then? restart the container with "docker composer up -d" ??


  • Host where PHPstorm runs must be reachable by the docker container, to test go into the container and
    1. call t5 service:ping ${XDEBUG_HOST}:${XDEBUG_PORT}
    2. if using a hostname, DNS entries must be returned (in my case my fritz.box returns three entries: a dead one, the LAN interface, the WLAN interface)
    3. For IPV6 see below separate section
    4. The dead IP does not provide the port 9000
    5. On LAN / WLAN interfaces port 9000 is listening and is reachable by PHP

...

Ensure that PHPStorm is listening to debug connections, check the status line at the bottom: 


Problems with IPv6

In my case PHPStorm was listening by default on IPv6 interface:

Image Added

But the docker containers are only talking IPv4. The easiest way was to disable IPv6 in PHPStorm, which I was able to do by adding / editing the file phpstorm64.vmoptions in the root of my home directory and adding there the line:


Code Block
-Djava.net.preferIPv4Stack=true

How to find the config file:

Image Added

Check https://www.jetbrains.com/help/phpstorm/tuning-the-ide.html how to find the right config file!

Now netstat looks better:

Image Added


Browser

Install helper

...