title: Enabling PHP Xdebug remote_enable causing 504 time-out every time
body: <p>I am trying to set up Xdebug correctly. With these settings when I visit any page I get a 504 time-out error after 30+ seconds. (I am using an ssh - tunnel so I use remote_host 127.0.0.1)</p>
  
  <pre><code>zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
  xdebug.remote_enable = 1
  xdebug.remote_autostart = 1
  xdebug.remote_handler = "dbgp"
  xdebug.remote_mode = req
  xdebug.remote_host = 127.0.0.1
  xdebug.remote_log = /home/ubuntu/xdebug-cgi.log
  xdebug.idekey = "rsalazar"
  xdebug.remote_port = 9000
  </code></pre>
  
  <p>Once I was able to get this xdebug log output , for some reason it does not post this output anymore:</p>
  
  <pre><code>&gt; Log opened at 2012-03-23 22:13:50 I: Connecting to configured
  &gt; address/port: 127.0.0.1:9000. I: Connected to client. :-)
  &gt; -&gt; &lt;init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
  &gt; fileuri="file:///home/ubuntu/www/info.php" language="PHP"
  &gt; protocol_version="1.0" appid="3119" idekey="rsalazar"&gt;&lt;engine
  &gt; version="2.2.0rc1"&gt;&lt;![CDATA[Xdebug]]&gt;&lt;/engine&gt;&lt;author&gt;&lt;![CDATA[Derick
  &gt; Rethans]]&gt;&lt;/author&gt;&lt;url&gt;&lt;![CDATA[http://xdebug.org]]&gt;&lt;/url&gt;&lt;copyright&gt;&lt;![CDATA[Copyright (c) 2002-2012 by Derick Rethans]]&gt;&lt;/copyright&gt;&lt;/init&gt;
  </code></pre>
  
  <p>Any idea?</p>
  
  <p>EDIT: I've determined it only happens when I enable debugging on a page (happens always when I turn on 'remote_autostart' of course) ... I want to guess that xdebug is waiting for server to connect (?)</p>