PhpStorm:无法评估表达式' $ _ SERVER [' SERVER_PORT']'

时间:2016-12-15 21:30:38

标签: php nginx phpstorm xdebug

我正在使用运行PHP 7.1(php-fpm)和Nginx的Docker容器。我已经安装并启用了Xdebug 2.5.0(如下图所示)。

enter image description here

我正在尝试使用"零调试配置"

使用这行代码调试单个index.php文件
<?php
    phpinfo();

但是我收到以下错误:

  

无法接受外部Xdebug连接:无法计算表达式   &#39; $ _ SERVER [&#39; SERVER_PORT&#39;]&#39;

我已经找到了类似的问题而且我找到了this但到目前为止没有任何帮助我。

以下是与Debug相关的PhpStorm配置:

enter image description here enter image description here enter image description here enter image description here enter image description here

我不确定这里的失败是什么,所以我需要一些帮助。具有Dockerfile等的存储库是here。我使用的是以下版本的PhpStorm:

PhpStorm 2016.3.2 EAP
Build #PS-163.10154.2, built on December 13, 2016
JRE: 1.8.0_112-release-408-b2 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

有人可以给我一些帮助吗?我在这个设置上缺少什么?

1 个答案:

答案 0 :(得分:0)

这是因为您使用的是unix:套接字而不是TCP协议。 重新配置PHP-FPM和NGINX以使用TCP

相关问题