Support » Plugin: WP Super Cache » Warning causes site to fail to load with WP_DEBUG on

  • Using wp-super-cache 1.2 (latest).

    With WP_DEBUG on, no page on my site can load – because WP-Super-Cache is throwing a PHP warning before the HTTP headers have gone out, and somehow there’s no gap after the headers end – so the web browser sees nothing but headers.

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. This includes command line output too, it makes it easier to read. ]

    $ wget -O - -S -q http://localhost/tp/
      HTTP/1.0 200 OK
      X-Powered-By: PHP/5.3.17
      Content-type: text/html; charset=UTF-8
      Vary: Accept-Encoding, Cookie
      Cache-Control: max-age=3, must-revalidate
      WP-Super-Cache: Served supercache file from PHP
      Content-Length: 41125
      Last-Modified: Thu, 01 Nov 2012 20:37:36 GMT
      Connection: keep-alive
      Date: Fri, 02 Nov 2012 07:29:47 GMT
      Server: lighttpd/1.4.31
    <b>Notice</b>:  Undefined index: HTTP_IF_MODIFIED_SINCE in <b>/home/david/testpress/wp-content/plugins/wp-super-cache/wp-cache-phase1.php</b> on line <b>205</b>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    The offending line with context is:

    204:                               } else {
    205:                                        $remote_mod_time = $_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ];
    206:                                }

    Looks like an existence check is needed there.

Viewing 1 replies (of 1 total)
  • This is also happening here. I’m wondering what is missing from my Apache configuration. I think there is no check because it is assumed this header is ubiquitous.

Viewing 1 replies (of 1 total)
  • The topic ‘Warning causes site to fail to load with WP_DEBUG on’ is closed to new replies.