Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cookies are blocked due to unexpected output in Wordpress

Couple of days back, i got this error when i was trying to login

Error

i did find out some solutions such as:

  1. Renaming Plugins folder
  2. Replacing Files which are giving error.

But these are not working in this case, still problem exists, so any help here would be appreciated.

The error:

ERROR: Cookies are blocked due to unexpected output.

This is server error log:

[10-May-2014 14:02:28 UTC] PHP Notice:  Use of undefined constant WP_TEMPLATE_URL - assumed 'WP_TEMPLATE_URL' in /home/paragint/public_html/wp-content/themes/RockStarLeadTheme-v2-4/functions/mobile/index.php on line 115
[10-May-2014 14:02:28 UTC] PHP Notice:  Use of undefined constant WP_TEMPLATE_URL - assumed 'WP_TEMPLATE_URL' in /home/paragint/public_html/wp-content/themes/RockStarLeadTheme-v2-4/functions/mobile/index.php on line 118
[10-May-2014 14:02:28 UTC] PHP Notice:  Use of undefined constant WP_TEMPLATE_URL - assumed 'WP_TEMPLATE_URL' in /home/paragint/public_html/wp-content/themes/RockStarLeadTheme-v2-4/functions/mobile/index.php on line 119
[10-May-2014 14:02:28 UTC] PHP Notice:  Undefined index: __getthere in /home/paragint/public_html/wp-content/themes/RockStarLeadTheme-v2-4/functions/mobile/index.php on line 189
[10-May-2014 14:02:28 UTC] PHP Notice:  Undefined index: __getthere in /home/paragint/public_html/wp-content/themes/RockStarLeadTheme-v2-4/functions/mobile/index.php on line 202
[10-May-2014 14:02:28 UTC] PHP Notice:  Undefined index: __getthere in /home/paragint/public_html/wp-content/themes/RockStarLeadTheme-v2-4/functions/mobile/index.php on line 213
[10-May-2014 14:02:28 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/paragint/public_html/wp-content/themes/RockStarLeadTheme-v2-4/functions/mobile/index.php:115) in /home/paragint/public_html/wp-login.php on line 414
[10-May-2014 14:02:28 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/paragint/public_html/wp-content/themes/RockStarLeadTheme-v2-4/functions/mobile/index.php:115) in /home/paragint/public_html/wp-login.php on line 426

Update: This issue basically occurred due to file encoding UTF-8 BOM instead of the usual UTF-8 in WordPress 3.9 but any idea how to get rid of that? because saving the file is not working out for me.

like image 263
Tushar Maroo Avatar asked Dec 15 '22 22:12

Tushar Maroo


1 Answers

I had same issue. What I did is I added ob_start() at top of wp-config.php then it allows me logged in. After that I update one of plugin that was requite to update. Then I logout and removed ob_start() and I surprised error was gone and never came again.

like image 130
Asif Asghar Avatar answered May 12 '23 05:05

Asif Asghar