Cannot modify header information – headers already sent
-
As several other people have reported, my logs are filling up with:
[02-May-2025 06:37:09 UTC] Warning at www.shkspr.mobi/blog/wp-cron.php?doing_wp_cron: [2] Cannot modify header information - headers already sent in /shkspr.mobi/blog/wp-content/plugins/litespeed-cache/src/purge.cls.php on line 515The specific line is part of the “Add tags to purge” function. Specifically:
// Send purge header immediately
$curr_built = $this->_build($purge2);
if (defined('LITESPEED_CLI')) {
// Can't send, already has output, need to save and wait for next run
self::update_option($purge2 ? self::DB_QUEUE2 : self::DB_QUEUE, $curr_built);
self::debug('CLI request, queue stored: ' . $curr_built);
} else {
@header($curr_built); // ← THIS LINE HERE!
if (defined('DOING_CRON') || defined('LITESPEED_DID_send_headers') || apply_filters('litespeed_delay_purge', false)) {
self::update_option($purge2 ? self::DB_QUEUE2 : self::DB_QUEUE, $curr_built);
self::debug('Output existed, queue stored: ' . $curr_built);
}
self::debug($curr_built);
}I can’t find a way to trigger it, so can’t easily test disabling all my plugins.
Any suggestions?
Last Report Number: HHHWIGVF
Last Report Date: 05/02/2025 12:52:50
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Cannot modify header information – headers already sent’ is closed to new replies.