headers already sent by … waf.php
-
My WordPress installation is in a subdirectory, and when I enabled Wordfence’s “extended protection”, I get the following series of PHP warnings:
[16-Jan-2023 09:10:01 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /home/xxxx/public_html/header.inc:1) in /home/xxxx/public_html/news/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 1157
[16-Jan-2023 09:10:01 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /home/xxxx/public_html/header.inc:1) in /home/xxxx/public_html/news/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php on line 749
[16-Jan-2023 09:10:01 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /home/xxxx/public_html/header.inc:1) in /home/xxxx/public_html/news/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php on line 750
[16-Jan-2023 09:10:01 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /home/xxxx/public_html/header.inc:1) in /home/xxxx/public_html/news/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php on line 751The header.inc file is simply the site banner. It’s called in my theme – in the body of course – thus:
<?php include_once('/home/xxxx/public_html/header.inc'); ?>
I think I understand the reason for the warning (Wordfence getting out in front of the theme), so is it possible to enable extended protection in a way to avoid the warning?
- The topic ‘headers already sent by … waf.php’ is closed to new replies.