• hello,

    i cant login to my wordpress site, plz help me out,
    when i trying to login to my site using wp-login.php it returns message that is enable cookies.

    and also at very beginning of my site the below code is occurred

    [Large code excerpt removed by moderator per forum rules. Please use the pastebin for all large code excerpts. It works better anyway.]

    plz help me out of this problem

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    Please try following:

    Navigate to wp-login.php and comment out following code:

    //	if ( isset($_POST['testcookie']) && empty($_COOKIE[TEST_COOKIE]) )
    //		$user = new WP_Error('test_cookie', __("<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='https://www.google.com/cookies.html'>enable cookies</a> to use WordPress."));
    //	else
    		$user = wp_signon('', $secure_cookie);

    This will bypass the check entirely and logs you in.
    I hope this helps.

    Thread Starter Gourav RR

    (@gouravrr)

    hi,

    I tried your advice, still its not workin, the login page coulnot be displays or it cant prompts for username and password, it only displays the error code at the very first of the document, i.e.

    [Moderated as per above]

    i think this has obviously been hacked…
    plz help me out,

    I had this issue a week or so ago. Turned out it was a hosting issue my advice is to speak to your host. When I rang them they said over 30 people had called with the same issue and they fixed it within a couple of hours

    Commenting out the code is a sloppy way of bypassing the problem (and didn’t work for me either just made things worse).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cant login to wp-admin, returns message i.e. enable cookies’ is closed to new replies.