是什么导致Xdebug的remote_host设置被忽略

时间:2019-02-15 10:30:10

标签: php xdebug

我的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地址?

1 个答案:

答案 0 :(得分:3)

可以从phpinfo()获取xdebug部分吗?

我想还有另一个文件(很可能是/etc/php/7.1/conf.d/xdebug.ini)会覆盖您对php.ini的设置

这是相关的说明What the .ini files in /etc/php5/conf.d folder are for?