WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] "Cookies are blocked or not supported" since update to 3.7.1 (105 posts)

  1. AdamElmer
    Member
    Posted 7 months ago #

    I have the same problem from 3 days now on an arabic version of wordpress site but the English wordpress is fine. both running on the same server .

    and both are the latest 3.7.1 , i made no core update for the last 3 weeks , now i cant login same cookie error on the arabic website .

  2. willem.deboer
    Member
    Posted 7 months ago #

    That's interesting. I am running the Dutch (NL) version on both my sites.

  3. AdamElmer
    Member
    Posted 7 months ago #

    i dont know what is happening , i can login to the wordpress admin by the TEMP METHOD . but no one else can login .
    The TEMP METHOD seams to work , but its TEMP only , this is so weird !!!

  4. willem.deboer
    Member
    Posted 7 months ago #

    If you read the thread from the beginning, see if some of the suggestions work for you. Scriptrunner explains the probable cause of this issue a few posts back.

  5. AdamElmer
    Member
    Posted 7 months ago #

    I dont use Varnish , but when i rename the plugin folder to plugin1 and create new folder and name it plugin witch is empty, im able to login, and when i login i just delete the empty plugin folder and rename the plugin1 folder to plugin using FTP , Refresh, then all is working fine , and i can access the admin panel and do every thing regular , but when i log-out , i have to do this method again , so i believe this has nothing to do with wordpress core files !!! any suggestions ??

  6. Scriptrunner (Doug Sparling)
    Member
    Posted 7 months ago #

    @AdamElmer - this is starting to venture into needing to start a new thread, but I'll go ahead and give you a couple of suggestions none the less.

    It sounds like you have a plugin that's not compatible with WordPress 3.7.1. So, try:

    1) Turn on WP_DEBUG and/or look in your server error logs. Besides the "Cookies are blocked or not supported" that's displayed on the login page, do you see any errors with debugging turned on? (and most likely, they'll be "headers already sent")

    2) Rename your plugin folder like you were doing, but add a single plugin back at a time to your new empty plugin folder and go through the logout/login process until you find the plugin that's causing the issue. Or alternatively, do what you're doing now, except deactivate all your plugins before logging out.

  7. WPyogi
    Volunteer Moderator
    Posted 7 months ago #

    @AdamElmer - this is starting to venture into needing to start a new thread, but I'll go ahead and give you a couple of suggestions none the less.

    Yes, starting a new thread would be a good idea - please see:

    http://codex.wordpress.org/Forum_Welcome#Where_To_Post

  8. Bytemason
    Member
    Posted 7 months ago #

    "setcookie" can't run after header has been sent.
    Header will be sent if you have an echo that runs before the setcookie in "wp-login.php". Tipically this may be in a theme function.php file. It maybe that you have a white space before the first "<?php". This doesn't show with normal debugging.

    It's difficult to detect when it happens because if you are logged in you dont need to alter the cookie so you won't see the problem. Cookie reading can be done at any stage. Your browser may also stay logged in over a long time depending on how you work, so it could be weeks untill you see the symptom. -Killer problem

  9. willem.deboer
    Member
    Posted 7 months ago #

    It's difficult to detect when it happens because if you are logged in you dont need to alter the cookie so you won't see the problem. Cookie reading can be done at any stage. Your browser may also stay logged in over a long time depending on how you work, so it could be weeks untill you see the symptom. -Killer problem

    Agree. That's probably what happened to my sites, so I didn't notice till 3.7.1. and thought the last update was what caused it.

  10. Scriptrunner (Doug Sparling)
    Member
    Posted 7 months ago #

    OK, this thread is up to 100 posts, so I'm going to summarize what's been discovered and try and close this thing down. I'd also like to make sure the original poster (@willem.deboer) gets a solution.

    Overview: The overarching issues is that after upgrading to WordPress 3.7 or 3.7.1 the user now gets the following error message onscreen when attempting to login:

    "Cookies are blocked or not supported"

    What should be happening (as of WordPress 3.7): When a user goes to wp-login.php, either directly or through a redirect from wp-admin, a test cookie should be set on that request. (an http GET.) When the login form is submitted, a check is made on the POST to see if the test cookie was set. This happens before authentication. If a test cookie was not set, then the user returns to the login form page (wp-login.php) and the "Cookies are blocked or not supported" message is displayed onscreen. Otherwise normal authentication occurs. (either user is taken to wp-admin or gets an onscreeen error message stating login failed due to incorrect username/password.)

    Why am I getting this error with WordPress 3.7/3.7.1?:

    1. (Confirmed) An update to WordPress 3.7 fixed a logic error that prevented the code in wp-login.php that actually tested for the presence of the test cookie from running. Some proxy/caching servers (confirmed with Varnish) are deleting WordPress cookies on GET requests, but since pre-WordPress 3.7 wasn't actually checking the presence of the test cookie, the fact that the test cookie was being deleted by the caching server was overlooked by WordPress and users could login successfully.
    2. (Unconfirmed, but some users have reported) Some plugins/themes may not be compatible with WordPress 3.7/3.7.1. The problem appears to be that a plugin/theme is sending output before the headers are being sent, causing a "headers already sent" warning, and consequently preventing WordPress from setting the test cookie (since "headers already sent" is a warning and not a fatal error, the web server will complete the request and simply not set the cookie).

    How do I tell which issue is effecting my site?:

    1. If you get the "Cookies are blocked or not supported" when you submit the login form, try logging in a second time. If you can successfully login on the second attempt, this is a good indicator that you have a proxy/caching server deleting WordPress cookies on http GET requests. (wp-login.php will also set the test cookie on a POST request, which is why you can login on the second attempt.)
    2. Rename your plugins directory under wp-content and then attempt to login. (basically, you need to disable all your plugins.) If you can now login, then you've got a problem with a plugin. (NOTE: Set WP_DEBUG to true in wp-config.php before renaming your plugin directory, this may tell you which plugin is at fault.) If you still can't login, try changing to a default theme like TwentyTweleve or TwentyThirteen.
    3. To state the obvious, make sure your browser is accepting cookies...
      Important: I'm not a moderator, so I can't close this thread, but we need to make sure it remains useful for anyone who may search for a solution to this problem. If you're not the original poster and this doesn't fix the problem you're having, please start your own thread and someone will be glad to help you there.
  11. willem.deboer
    Member
    Posted 7 months ago #

    OK. Solved. The engineer of my webhost solved the riddle!
    As it turns out, I have a theme and a plugin that somehow caused all troubles about the cookies not being set.
    Theme: "Appointment"
    Plugin: "easy-wp-cookie-popup"
    Wordpress 3.7.1 wouldn't revert to Twenty11 so he changed the theme name manually in the database. That wasn't enough. He also copied the entire wp-admin folder to the server from a fresh zip, as well as wp-login.php.
    With all plugins disabled, this was a working install. No login problem, no cookie problem. Re-enabling Appointment theme restarted all trouble.
    After enabling plugins one by one it turned out above plugin was the other culprit.
    Somehow the combination of the two elements did something to the wp-admin directory as well, or messed up more then just their own confines.
    I think both theme and plugin contain a workaround for the cookie bug in pre-3.7.x WordPress, that is now causing the problems.

  12. Scriptrunner (Doug Sparling)
    Member
    Posted 7 months ago #

    @willem.deboer - Awesome, thank you for the update and I'm very happy you got it figured out! If possible, could you kindly set the thread as "resolved"?

  13. WPyogi
    Volunteer Moderator
    Posted 7 months ago #

    Important: I'm not a moderator, so I can't close this thread, but we need to make sure it remains useful for anyone who may search for a solution to this problem. If you're not the original poster and this doesn't fix the problem you're having, please start your own thread and someone will be glad to help you there.

    Thank you, Doug! I'll mark it resolved and if people post into it, close it.

  14. willem.deboer
    Member
    Posted 7 months ago #

    OK, how can I close this thread. Thanks for all the help!

  15. WPyogi
    Volunteer Moderator
    Posted 7 months ago #

    You can't close it, only moderators can - now done :) !

Topic Closed

This topic has been closed to new replies.

About this Topic