I love your plugin. It provides a great service–thank you!
However, I’m encountering the following problem. When front-end access is blocked, the plugin DOES block access to the site, but it also displays this error message to the person trying to visit the site:
Warning: Cannot modify header information - headers already sent by (output started at ... /wp-content/themes/ThemeName/header.php:7) in ... /wp-content/plugins/iq-block-country/iq-block-country.php on line 531
That message is repeated five times, and refers to the iq-block-country.php file at the following line numbers: 531, 532, 533, 534, and 537.
As noted above, the error also references …ThemeName/header.php at line 7. For context, I’ll provide lines 1-8 below from that ThemeName/header.php file:
<?php /** * @package WordPress * @subpackage ThemeName */ ?><!DOCTYPE html> <html <?php language_attributes(); ?>> <head>
Any ideas on how to prevent the error message from displaying?
One of the negative effects of this error message is that a hacker in a blocked country can see the entire directory structure of the site, can see that it is a WordPress site, can see the WP ThemeName that the site is based on, and can also see that the site is being blocked by the IQ-Block-Country plugin…which is only going to give them all kinds of ideas for pursuing a hack against the plugin. Would be much better if the site did not reveal so much information when it’s trying to block a hacker.
Thanks for any ideas!
- The topic ‘Error: Cannot modify header information’ is closed to new replies.