什么可能导致 xdebug 的 remote_host 设置被忽略
What could cause xdebug's remote_host setting to be ignored
我的 xdebug.remote_host
设置被完全忽略,取而代之的是另一个主机。
在我的 /etc/php/7.1/cli/php.ini
:
[xdebug]
zend_extension=/usr/lib/php/20170718/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host=10.0.4.89
xdebug.remote_port=8020
xdebug.idekey=albumview--php-fpm
xdebug.remote_log=/var/www/albumviewer-api/output/xdebug.log
然而,当我 运行 一个 cli 脚本时,我在日志中看到了这个:
Log opened at 2019-02-15 10:19:27
I: Connecting to configured address/port: 192.168.2.54:8020.
E: Time-out connecting to client (Waited: 200 ms). :-(
Log closed at 2019-02-15 10:19:27
重新启动 docker 容器无效。我错过了什么?为什么它尝试连接到 192.163.2.54 而不是我指定的 ip 地址?
你能从 phpinfo()
得到 xdebug 部分吗?
我想还有另一个文件(很可能是 /etc/php/7.1/conf.d/xdebug.ini
)覆盖了 php.ini
的设置
这里有相关说明What the .ini files in /etc/php5/conf.d folder are for?
我的 xdebug.remote_host
设置被完全忽略,取而代之的是另一个主机。
在我的 /etc/php/7.1/cli/php.ini
:
[xdebug]
zend_extension=/usr/lib/php/20170718/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host=10.0.4.89
xdebug.remote_port=8020
xdebug.idekey=albumview--php-fpm
xdebug.remote_log=/var/www/albumviewer-api/output/xdebug.log
然而,当我 运行 一个 cli 脚本时,我在日志中看到了这个:
Log opened at 2019-02-15 10:19:27
I: Connecting to configured address/port: 192.168.2.54:8020.
E: Time-out connecting to client (Waited: 200 ms). :-(
Log closed at 2019-02-15 10:19:27
重新启动 docker 容器无效。我错过了什么?为什么它尝试连接到 192.163.2.54 而不是我指定的 ip 地址?
你能从 phpinfo()
得到 xdebug 部分吗?
我想还有另一个文件(很可能是 /etc/php/7.1/conf.d/xdebug.ini
)覆盖了 php.ini
这里有相关说明What the .ini files in /etc/php5/conf.d folder are for?