Support » Plugin: Comet Cache » PHP errors since upgrade to WP 5.3 ‘Cannot modify header information’

  • Since upgrading to WP 5.3, our PHP error log is loaded with these messages… comet-cache >> HttpUtils.php attempting to modify header information already sent:

    [13-Nov-2019 01:49:33 UTC] PHP Warning:  Cannot modify header information - headers already sent in /home/bigbstr2/public_html/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 174
    [13-Nov-2019 01:49:33 UTC] PHP Warning:  Cannot modify header information - headers already sent in /home/bigbstr2/public_html/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 175
    [13-Nov-2019 01:51:04 UTC] PHP Warning:  Cannot modify header information - headers already sent in /home/bigbstr2/public_html/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 172
    [13-Nov-2019 01:51:04 UTC] PHP Warning:  Cannot modify header information - headers already sent in /home/bigbstr2/public_html/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 173
    [13-Nov-2019 01:51:04 UTC] PHP Warning:  Cannot modify header information - headers already sent in /home/bigbstr2/public_html/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 174
    [13-Nov-2019 01:51:04 UTC] PHP Warning:  Cannot modify header information - headers already sent in /home/bigbstr2/public_html/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 175
    • This topic was modified 7 months, 3 weeks ago by adopted3. Reason: add WP version
Viewing 12 replies - 1 through 12 (of 12 total)
  • I’m seeing exactly the same.

    But the code in Comet Cache itself is unchanged and looks normal, just trying to add some cache-suppressing headers at that point. Which up until recently worked fine. So for some reason, the headers are now being sent too early.

    See here.

    Yup, normally this happens when some file has a BOM, or has white space beyond the closing ?> (which in general should therefore be omitted).

    So the problem is in general hard to find – WHICH of the many PHP files executed before HTML output actually should happen is the culprit? Is it in the theme (unchanged in my WP, so no), or a recently updated plugin, or in WP Core (the latter seems unlikely or there would have been a huge outcry).

    Anyone know how to find the cause quickly and easily?

    Tim

    Well, I did find some old ISO-8859-1 characters in my wp-config.php, but removing them has not solved this problem, It’s somewhere else )-:

    On further inspection: This should be easy to fix, see here, and many other places.
    Our common problem is, that the subclause ” (output started at…” – which would tell us which file is the culprit – is missing in our error messages.

    Howcome? I’m using (Plesk) PHP 7.3.11, via Nginx (directly) and PHP-FPM.

    @jumbo thanks for the pointer, but I do not see any answer there…

    On further research and reflection, what I can say is that I do NOT see this problem with the Weaver Xtreme theme (from Bruce Wampler, which I use a lot). But I do see it with some older themes: Edin, DI-Basis, Tatami (Elma Studios) and Customizr. So maybe it really is ultimately to do with the theme calling some old functions at thwe wrong point in the process?

    I did find a way to get rid of the error: Deactivate and Delete Comet Cache )-: What is not exactly want I wanted to do.

    Any ideas, anyone?

    Tim

    Similarly there seems to be a problem with W3TC.

    So something has changed under the hood of WP 5.3 which is causing grief for some of us.

    And it does seem – at least in some cases – to be the theme, see here.

    I am having this issue as well. I don’t think it is a whitespace issue. The all the lines in this function fire the warning. It is probably an execution order thing:

    /**
    * Sends no-cache headers.
    *
    * @since 151220 Enhancing no-cache headers.
    */
    public function sendNoCacheHeaders()
    {
    header_remove(‘Last-Modified’);
    header(‘Expires: Wed, 11 Jan 1984 05:00:00 GMT’);
    header(‘Cache-Control: no-cache, must-revalidate, max-age=0’);
    header(‘Pragma: no-cache’);
    }

    Hi, I have the same issue, log flooded with such messages.
    What’s the status? Is there a fix coming, by any chance?

    Regards
    Franco

    No response in a week for me. Might want to just start a new thread on it. Pretty sure it is execution order of that sendNoCacheHeaders function

    Having the same issue. Any solution? Our logs are flooded.

    Is a fix foreseen? Can we have a ETA, please?

    had to delete Comet 🙁 no solution from devs…

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.