Note that there are some explanatory texts on larger screens.

plurals
  1. POOnly half of page loading
    primarykey
    data
    text
    <p>I have an application (CakePHP 2.2) that worked fine up until lately, however all of a sudden it's started only delivering part of the page. The HTML for the page is truncated, however it doesn't always truncate at exactly the same place each time (although it's about the same place).</p> <p>I've had someone else test this from another location &amp; they also experienced the same problem.</p> <p>The first time I had this problem I restarted the server &amp; it appeared to resolve the problem, however it's happened again. This time I've tried restarting Apache, rather than the whole server &amp; it does not appear to have resolved the problem.</p> <p>I'm not sure what else to try, so any suggestions welcome.</p> <p>Thanks in advance.</p> <p><strong>Update</strong>: I've also now tried disabling APC but the problem continued after this was disabled.</p> <p><strong>Another update:</strong> Having tried adding content above &amp; below the point it was truncating, it would appear that it is truncating at a certain distance from the end of the file, as the approximate break point only moved when content is added after where it's breaking.</p> <p><strong>Yet another update</strong>... OK, so I've done even more digging &amp; there seems to be a problem with the calculation of the content length on my production server. Here's the output from my digging (Date headers stripped to save space)...</p> <h3>Server with Content-Length unset</h3> <p>If I unset the <code>Content-Length</code> header in the CakeResponse::_setContentLength(), the full page displays fine, &amp; this is the header returned…</p> <pre><code>Connection close Server Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/1.0.0-fips mod_bwlimited/1.4 Transfer-Encoding chunked X-Powered-By PHP/5.3.24 </code></pre> <h3>Server with Content-Length set</h3> <p>If I don't unset the <code>Content-Length</code> header then the page displayed is truncated, &amp; the response headers are…</p> <pre><code>Connection close Content-Length 2455 Content-Type text/html; charset=UTF-8 Server Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/1.0.0-fips mod_bwlimited/1.4 X-Powered-By PHP/5.3.24 </code></pre> <h3>Local Machine with Standard Content-Length</h3> <p>I would think it's the header length calculation, apart from the fact that on my local machine, even without unsetting the <code>Content-Length</code> header, the full page displays, even though the <code>Content-Length</code> returned is the same as on the production server...</p> <pre><code>Connection Keep-Alive Content-Length 2455 Content-Type text/html; charset=UTF-8 Keep-Alive timeout=5, max=100 Server Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8x X-Powered-By PHP/5.3.15 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload