title: Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data
body: <p>I get this error</p>
  
  <pre><code>Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
  </code></pre>
  
  <p>in my PHP functions if I do not do an <code>echo</code> followed by a <code>flush()</code>. In these functions where I have to do the <code>echo</code> and <code>flush()</code>, I am using <code>shell_exec()</code> to run <code>phantomjs</code> and processing the result returned by it using <code>simple_html_dom</code>. I am also using a PHP framework called Laravel.</p>
  
  <p>What cause this error, and why does <code>echo</code>ing and doing a <code>flush()</code> fix this error?</p>