title: XDebug could not open the remote debug file '/var/log/xdebug.log' while reading response header from upstream
body: <p>I am using docker for developing, which worked without any problems at all until I had no space left on my disk (my Ubuntu partition is only 30G). So I deleted all containers and images which weren't running/used anymore and had enough space.</p>
  
  <p>After starting my application again, I'm now getting a <code>ContextErrorException</code> with the following message</p>
  
  <p><code>Warning: Header may not contain more than a single header, new line detected</code></p>
  
  <p>When I look into the <code>error.log</code>, this is the content</p>
  
  <pre><code>2017/04/29 12:53:13 [error] 13#13: *1 FastCGI sent in stderr: "PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'" while reading response header from upstream, client: 172.17.0.1, server: app, request: "GET /admin/dashboard HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost:8080"
  2017/04/29 12:53:24 [error] 13#13: *1 FastCGI sent in stderr: "PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'.
  PHP message: XDebug could not open the remote debug file '/var/log/xdebug.log'" while reading response header from upstream, client: 172.17.0.1, server: app, request: "GET /admin/dashboard HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost:8080"
  </code></pre>
  
  <p>I did the following steps in both environments (docker-container and host system)<br>
  I went into <code>/var/log/</code> and saw that there was no file <code>xdebug.log</code> so I created the file and - just for testing purpose - gave them <code>777</code> rights and changed the owner/group to the same as my project files/docker files</p>
  
  <p>The error still exists, however. I even deleted ALL container and images, not only the unused one, and built it completely from scratch. This doesn't seem like a Docker error, because it worked without problems until the disk space was full, right?</p>
  
  <p>This is the result of <code>php -i | grep xdebug</code></p>
  
  <pre><code>xdebug
  xdebug support =&gt; enabled
  xdebug.auto_trace =&gt; Off =&gt; Off
  xdebug.cli_color =&gt; 0 =&gt; 0
  xdebug.collect_assignments =&gt; Off =&gt; Off
  xdebug.collect_includes =&gt; On =&gt; On
  xdebug.collect_params =&gt; 0 =&gt; 0
  xdebug.collect_return =&gt; Off =&gt; Off
  xdebug.collect_vars =&gt; Off =&gt; Off
  xdebug.coverage_enable =&gt; On =&gt; On
  xdebug.default_enable =&gt; On =&gt; On
  xdebug.dump.COOKIE =&gt; * =&gt; *
  xdebug.dump.ENV =&gt; no value =&gt; no value
  xdebug.dump.FILES =&gt; no value =&gt; no value
  xdebug.dump.GET =&gt; * =&gt; *
  xdebug.dump.POST =&gt; * =&gt; *
  xdebug.dump.REQUEST =&gt; * =&gt; *
  xdebug.dump.SERVER =&gt; * =&gt; *
  xdebug.dump.SESSION =&gt; * =&gt; *
  xdebug.dump_globals =&gt; On =&gt; On
  xdebug.dump_once =&gt; On =&gt; On
  xdebug.dump_undefined =&gt; Off =&gt; Off
  xdebug.extended_info =&gt; On =&gt; On
  xdebug.file_link_format =&gt; no value =&gt; no value
  xdebug.force_display_errors =&gt; Off =&gt; Off
  xdebug.force_error_reporting =&gt; 0 =&gt; 0
  xdebug.halt_level =&gt; 0 =&gt; 0
  xdebug.idekey =&gt; php-debug =&gt; php-debug
  xdebug.max_nesting_level =&gt; 250 =&gt; 250
  xdebug.max_stack_frames =&gt; -1 =&gt; -1
  xdebug.overload_var_dump =&gt; On =&gt; On
  xdebug.profiler_aggregate =&gt; Off =&gt; Off
  xdebug.profiler_append =&gt; Off =&gt; Off
  xdebug.profiler_enable =&gt; Off =&gt; Off
  xdebug.profiler_enable_trigger =&gt; Off =&gt; Off
  xdebug.profiler_enable_trigger_value =&gt; no value =&gt; no value
  xdebug.profiler_output_dir =&gt; /tmp =&gt; /tmp
  xdebug.profiler_output_name =&gt; cachegrind.out.%p =&gt; cachegrind.out.%p
  xdebug.remote_addr_header =&gt; no value =&gt; no value
  xdebug.remote_autostart =&gt; Off =&gt; Off
  xdebug.remote_connect_back =&gt; Off =&gt; Off
  xdebug.remote_cookie_expire_time =&gt; 3600 =&gt; 3600
  xdebug.remote_enable =&gt; On =&gt; On
  xdebug.remote_handler =&gt; dbgp =&gt; dbgp
  xdebug.remote_host =&gt; 192.168.0.10 =&gt; 192.168.0.10
  xdebug.remote_log =&gt; /var/log/xdebug.log =&gt; /var/log/xdebug.log
  xdebug.remote_mode =&gt; req =&gt; req
  xdebug.remote_port =&gt; 9000 =&gt; 9000
  xdebug.scream =&gt; Off =&gt; Off
  xdebug.show_error_trace =&gt; Off =&gt; Off
  xdebug.show_exception_trace =&gt; Off =&gt; Off
  xdebug.show_local_vars =&gt; Off =&gt; Off
  xdebug.show_mem_delta =&gt; Off =&gt; Off
  xdebug.trace_enable_trigger =&gt; Off =&gt; Off
  xdebug.trace_enable_trigger_value =&gt; no value =&gt; no value
  xdebug.trace_format =&gt; 0 =&gt; 0
  xdebug.trace_options =&gt; 0 =&gt; 0
  xdebug.trace_output_dir =&gt; /tmp =&gt; /tmp
  xdebug.trace_output_name =&gt; trace.%c =&gt; trace.%c
  xdebug.var_display_max_children =&gt; 128 =&gt; 128
  xdebug.var_display_max_data =&gt; 512 =&gt; 512
  xdebug.var_display_max_depth =&gt; 4 =&gt; 4
  </code></pre>
  
  <p>Anyone got any idea?</p>