How to resolve error “Cookies are blocked due to unexpected output.”?

I am facing an error as per below at admin panel login.

"ERROR: Cookies are blocked due to unexpected output."

I've tried several solutions like,

  1. Log checking (No logs are showing in log file)
  2. Resolve header already sent issue (Not getting this error at all).
  3. Check incomplete 'php tag', removing white spaces etc (Have already checked both).

We have re-solve above 3 things but still the issue is there.

Would anyone please check this and help me on this ?

Topic cookies php errors login Wordpress

Category Web


You might be able to narrow it down using output buffering on different hooks... eg.

add_action('plugins_loaded','start_buffer');
function start_buffer() {ob_start();}

add_action('wp_loaded','end_buffer');
function end_buffer(); {ob_end_clean();}

ie. this is a broad test but if the error goes away, the output is happening between those two actions, if not try hooking in earlier (unlikely but could be later too) until it does using the Action Reference as a rough guide.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.