• Kahome

    (@kahome)


    ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

    Hi, I am getting the above error in over 10 different websites and my cookies are enabled. I have tried everything and nothing is working for me. Someone kindly assist.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Undergod11

    (@undergod11)

    Next time use the search…..

    https://www.ads-software.com/support/topic/cookie-error-when-logging-in?replies=117

    Here is the fix…by niosus

    I encountered the same issue and have managed to make it work, and a theory of what could be the issue.

    First of all, how to get logged in again. Comment out lines 744-746 in wp-login.php . It should look like this:

    // if ( isset($_POST[‘testcookie’]) && empty($_COOKIE[TEST_COOKIE]) )
    // $user = new WP_Error(‘test_cookie’, __(“ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”));
    // else
    $user = wp_signon(”, $secure_cookie);

    This will bypass the check entirely and logs you in.

    At first I didn’t understand why it might fail, but then I remembered I am running behind a Varnish cache which filters out all but some select cookies. I haven’t checked, but I am fairly certain that my Varnish setup filters out the WordPress test cookie when it receives the login request (the actual POST with the login data). Is it possible all of you are running behind a proxy which filters cookies?

    This is pretty sloppy by the WordPress team. They could also just test the session cookie. If THAT one doesn’t get through, it will fail anyway. Completely breaking when a test cookie is missing should not happen.

    I hope this helps…

    Thread Starter Kahome

    (@kahome)

    @undergod11 I had tried that and I have tried it again and it is still not working.
    I am also not using any cache plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cookies error while login in.’ is closed to new replies.