Search code examples
wordpresscookies

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.


Solution

  • I tried following solutions by which similar issues get resolved

    • Changing file formats (UTF-8 BOM to UTF-8)
    • Renaming Plugins folder
    • Replacing Files which are giving error (On enabling wp-debug)

    But in my case final solution was to upgrade the WordPress, or more likely you can say replacing core WordPress files using FTP. I followed this guide for manual upgrade: http://codex.wordpress.org/Updating_WordPress