Oh no! WordPress login Error!
Today morning when i tried to login in my wp admin panel i faced a strange problem.
The wp-admin page was vanished like a blank page in wp-admin dir after than i tried to login via wp-login.php then i got an error says
“ERROR: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums.”
But there where no Cookies blocked so i goggled my problem and found some useful answers like :
Reason Behind it:
One of the active plugins (or the theme’s functions.php file) produces unexpected output, causing a “headers already sent” warning and consequently preventing WordPress from setting the test cookie.
UTF-8 byte order mark in wp-config.php (or theme’s functions.php file) has the same effect as above.
Solution :
In case of a plugin issue, the solution would be to rename its folder via FTP. In case of a UTF-8 byte order mark issue, the solution is to re-save the file without it. Notepad++ has an option for that: “Convert to UTF-8 without BOM”.
But both the solution doesn’t worked for me, then i checked my theme’s function.php and found that some extra code has been added to it so i just replaced it with the original function.php file and my problem was solved!
I also found that this error may be a Bug in WordPress 3.9, many user doesn’t get the genuine solution for there question, So you may ask here. May be i can help you 🙂
i have the same problem, i compare the function.php with new one from fresh downloaded themes, and it’s exactly same.
wp-config.php is UTF 8 not UTF 8 BOM
how do you check if UTF i use are UTF-8 BOM?
what folder should i rename ?
is it wordpress 3.9 bug?
please i need help, thanks
Hello, wp-config.php can be UTF 8 BOM only if you have created it manually, i suggest you to check your theme folder, and see if there are some random .png files which are not there in the original theme. using random plugin(s) attract hackers.
Thanks for reply,
wp-config.php is created automatically on my case, and it’s utf-8 without BOM.
there is no weird png i think.
how to disable plugins without accessing wp-admin?
i use ithemes security too(maybe help)
how to change themes without accessing wp-admin? delete my current themes so twenty fourteen will be my themes?
Thanks
Okay now i can access my wp-admin by renaming my plugins folder, standard login and renaming back my plugins folder.
at least i can access my wp-admin 😛
gr8 bt make sure that your plugin is clean or else you will face this prob again after some time
I have found the functions.php file under wp-content/themes directory (in ftp) but I have no knowledge how to rename it or check it otherwise
Just replace it with the old function.php from your theme file.
i don’t know even how to do that? sorry, i’m totally newbie with any advanced wordpress coding etc.
open your function.php in a text editor or any other editor and just check at the bottom of it, if you find any codes which are linked to 5-6 .png files. if yes then remove those lines and save it!
thx a million! i got it working actually by renaming the plugins folder. have a great day!
Note: you can face this problem again!
in that case scan your website for virus..
you are right, the problem continued. i have not done virus scanning yet. neither could i find any 5-6 .png files linked in the text editor.
Change your theme files with the original one
this turn out to be plugin bug which i solved by deleting all plugins and re-instralling them one by one until the problem came out again. the only way i could access the wp-admin was to use ftp to re-name the plugin folder for a second and then re-naming it back. thx for the support.
bhawani bhai awesome solution it really works…thanks alott!!!
i wrote the same here – > http://wordpress.org/support/topic/unable-to-log-in-cookies-are-blocked-due-to-unexpected-output?replies=27#post-5619059
, but …… it MUST be the function files … same problems like you guys (i cloned a copy of wp 3.9 with “duplicator”-plugin) and couldn’t log in … i change name of the “heavy modified” themes, i used (via ftp) and let wp switch to default theme “twenty fourteen” (!) – THEN i could log in, changed my themes to the original name back (via ftp) and select the child theme via wp admin …then i also changed my password (admin) from within wp-admin and logout … no problems anymore, nor error message, normal log-in procedure…
hope that helps some of you …
Even not believing, I did what some other people was recommending — and it did work!
Just remove the closing — ?> — from the theme’s FUNCTIONS.PHP file.
Hi,
i face same above problem of cookies are blocked due to unexpected. i just rename the file of plugins folder to login perfectly. but i face another problem of already installed plugins are not work.
I tried everything…. I just can’t fix my error that ERROR: Cookies are blocked due to unexpected output. I read everyone’s comments and it won’t work.. #Help
What seems to have worked for me was un-doing what I may have caused on my end. Essentially, I updated the wp-config.php via the “editor” in cPanel’s File Manager. Re-saving the file via the “code editor” seems to have fixed it for me. So in this case, it was likely a character encoding issue.
This Definately works : Solution by BOB :
Link : http://wordpress.org/support/topic/warning-cannot-modify-header-information-headers-already-sent-15
=======================================================================================================
Bob’s Solution:
Hey there!
I’m hoping to help YOU and everyone who has this bloody error once and for all. This worked for me, and I sure hope it works for you. I once had the issue happen on my site over at: SharpeFIT.com not once, but THREE times, and have safely recovered it after many head-bangs against the computer keyboard (lol).
(*Note: I’ve tried the whole and removing “blank lines” from the other help files, and nothing worked at all – what I’m about to share was the only thing that worked for me*)
Here we go. First off, you need to know WHERE the issue is coming from. Let’s use your error as an example:
Warning: Cannot modify header information – headers already sent by (output started at /home/paulswanson22/travelerpaul.org/wp-content/themes/thesis_185/custom/custom_functions.php:1) in /home/paulswanson22/travelerpaul.org/wp-includes/pluggable.php on line 876
Now, the BOLDED section is the culprit. Not pluggable.php. So, what you have to do is go into your FTP (use a FTP host like Dreamweaver, FTP, etc. – if you don’t have one, you can also try to go into your FileManager with CPanel or whatever service your host runs on).
Step 1. Go into /wp-content/themes/thesis_185/custom/custom_functions.php (or whatever the location is showing in the first set of parenthesis) Copy (CTRL-C) the entire document – no more, no less.
Step 2. Open NOTEPAD in Windows and PASTE (CTRL-V) the entire document into notepad. Go to the top of the file and make sure there is no extra space before
Step 3. Save AS in Notepad. Rename the file to custom_functions.php (the original file located in Step 1).
Step 4. Go into your FTP/File Manager, and upload the PHP file. It will probably ask you if you want to overwrite the file (because it already exists) – YES you do want to overwrite it (just make sure it matches the copy/paste you did in steps 1 and 2.
Step 5. Refresh your Browser, and the original error message *Should* go away.
But wait…there may be more!
Then, it might flash another error, instead of /wp-content/themes/thesis_185/custom/custom_functions.php as the culprit, it may throw something random like /wp-content/plugins/someplugin/theplugin.php. For example, the error would then show something like:
Warning: Cannot modify header information – headers already sent by (output started at /home/paulswanson22/travelerpaul.org/wp-content/plugins/someplugin/theplugin.php:48) in /home/paulswanson22/travelerpaul.org/wp-includes/random.php on line 876
How to fix it? Follow steps 1-5, finding this new file under wp-content/plugins.
After that, YES – it may happen yet again. A new error code! This time it might even be pluggable.php, or wp-login. Regardless, just keep following steps 1-5 until it clears up. There was one time I had to do this for 9 or 10 times before it stopped showing all of the errors.
The key is finding whatever file is showing up first (in this example, in the bolded piece above) and doing Step 1-5.
I sure hope this helps. It may not work for everyone, but after trying all of the other help files with no luck, this was what worked for me!
If you have any questions or need clarification, let me know.
Bob
Hello SIr,
I’m facing the same problem , when i access to /wp-admin its showing a blank white page and if i access to /wp-login.php
ERROR: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums..
I have rename the plugin folder, but doesn’t work for me still blank page. I have also checked the function page for blank space , but nothing was found.
Please help me 🙁
Hi guys,
Nothing to worry if you faced this error. Access your root folder using ftp client then rename the theme which is using currently & then rename the plugin folder.Now access your http://www.yourdomain.com/wp-admin.Great success no need to look up log error.After that again rename the theme & plugin as before it was…..