WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Cookie Error when Logging In (117 posts)

  1. MariaA
    Member
    Posted 8 months ago #

    I just installed WordPress and cant login because cookie problem. I tried to change login-php - but then I get to the white page. I use Chrome, I tried on Ie an Firefox on mobile - the same.
    If I undestand it right - I just sett // before lines 744-746?

    I tried to change functions.php too, but I dont have any site yet and theme, så probably thats why it didnt worked for me easer.
    When I go to http://www.mydomane.no, så I get some default theme - I hadnot chanse to change anything on.

    Any sugestions? Or anyone can recommend another online site-editor that works? I dont have site yet, I am here because everybody told me Word Press is easy... Right. ;)

  2. willem.deboer
    Member
    Posted 8 months ago #

    @MariaA I'm having exactly the same problems. To defend WordPress, my sites have been running problem free for almost two years.
    Somehow, something has gone wrong in the last version, 3.7.1.
    If you read this thread from the beginning and try the solutions, they may work for you.

  3. willem.deboer
    Member
    Posted 8 months ago #

    @Cam sorry, no double coding. You may consider yourself officially stumped. Same goes for me. I applied the same patches to my other install, http://www.willemdboer.org. Same result there. The blank screen.
    The gmail.css mystery is cleared as well. It is a Chrome extension and disabling makes the blank screen stop one step earlier :-(
    I just don't know what else to try. If I can't get into the admin screen I am in serious trouble. I don't think reinstalling is going to be of help either, looking at MariaA's post ......
    Where are the WordPress guys in all of this?

  4. MariaA
    Member
    Posted 8 months ago #

    2willem.deboer I have read all posts several times and tried every suggestions - several times ;). But the best I can get is a white page.
    I am not så familier with scripts, maybe I doing something wrong. My page is http://www.medisinsk-yoga-oslo.no, maybe somebody can take a look?

    I just want to have it easy, thats all, but I even cant get into it. Have this problem two week now. So where is Wp guys, oppgrading? fix it easy way?

  5. alfjmrodrigues
    Member
    Posted 8 months ago #

    @Cam, @Willem, @Amstor and the rest of the tribe, You are ALL AWESOME!
    Thanks a bunch for all the suggestions you made, as that shows a very high standard on the consideration arena.

    So, replying to your questions/suggestions:
    I have used Chrome and Firefox, with no luck.

    My cookies are enabled on both Browsers, that's for sure, and nothing works with 3.7.1.

    I have an IPAD (with cookies ENABLED) which has the same problem with the 3.7.1 version.

    I tried to download version 3.7, get the wp-login.php and apply it to my 3.7.1 installation, with no luck again.

    Yesterday I have been trying to have this problem solved, and it took me around 3 hours to just give up and go to bed.

    Today I decided to start from scratch, and so, I completely erased my installation, and installed version 3.7, ET VOILA! It worked like a charm!

    So, my dearest friends, 3.7.1 has definitely a problem, and I will not take anymore time to understand what is it.

    Lessons learned:
    I WILL NOT upgrade to 3.7.1, and will only upgrade to the next version, AFTER reading the comments on forums like this and be assured I will not get stuck.

    Wish you all the best of lucks and if I discover something about this I will post it here, as a comment.

    Love you all!
    Alfredo Rodrigues

  6. alfjmrodrigues
    Member
    Posted 8 months ago #

    Guys, just a final note:

    WordPress just decided to automatically upgrade my 3.7 installation to 3.7.1, and...

    IT´S WORKING :)

    Well, let´s cross the fingers...

    Cheers
    AR

  7. amsgator
    Member
    Posted 8 months ago #

    @alfjmrodrigues It has worked for me too from the beginning with the exception of the CNAME issue which I fixed with the .htaccess redirect. I also upgraded from a prior version and did not do a fresh 3.7.1 install.

    You may still run into issues with that if you try to login from the opposite CNAME (www or non-www) from that set in your settings. That is why I recommend the .htaccess redirect to whichever CNAME you're using so it doesn't happen.

  8. alfjmrodrigues
    Member
    Posted 8 months ago #

    Lovely, Amsgator!

    Implemented as the master suggested ;)

    Can you do your hacking to see if was well implemented?
    (I removed the '<?php' and '?>' as it were already on the functions.php file)

    Cheers
    AR

  9. MariaA
    Member
    Posted 8 months ago #

    @alfjmrodrigues: I cant find any 3.7 just 3.7.1.

    Anybody took contact with WP team and rapport this problem?

  10. amsgator
    Member
    Posted 8 months ago #

    @MariaA Here are the archive downloads http://wordpress.org/download/release-archive/

    @alfjmrodrigues I deleted the hack from the forum when I saw you were able to update. Regardless, it's a good idea to hide those files and hide the version number. I'll re-add the code for those who want it.

    It looks like the blocking worked, when I try to access http://www.maiscashback.com/readme.html (and the others) it gives a 403 error so that's good.

    # BEGIN Deny Access to Certain Files
    	<FilesMatch "readme.html|license.txt|wp-config-sample.php">
    	Order allow,deny
    	Deny from all
    	</FilesMatch>
    # END Deny Access to Certain Files

    The generator tag is also removed from your page source, so it looks like you're good.

    Add this to the functions.php file to remove the wordpress version from source code.

    # Remove WordPress Version
    	function remove_wp_version() { return ''; }
    	add_filter('the_generator', 'remove_wp_version');
    
    # Remove Version Query Strings From JavaScript JS and CSS Stylesheet Files
    function _remove_script_version( $src ){
    	    $parts = explode( '?', $src );
    	    return $parts[0];
    	}
    	add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
    	add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
  11. alfjmrodrigues
    Member
    Posted 8 months ago #

    @amsgator, I already had inserted the last portion of code to the beginning of the functions.php:

    <?php
    /**
     * Twenty Twelve functions and definitions
     *
     * Sets up the theme and provides some helper functions, which are used
     * in the theme as custom template tags. Others are attached to action and
     * filter hooks in WordPress to change core functionality.
     *
     * When using a child theme (see http://codex.wordpress.org/Theme_Development and
     * http://codex.wordpress.org/Child_Themes), you can override certain functions
     * (those wrapped in a function_exists() call) by defining them first in your child theme's
     * functions.php file. The child theme's functions.php file is included before the parent
     * theme's file, so the child theme functions would be used.
     *
     * Functions that are not pluggable (not wrapped in function_exists()) are instead attached
     * to a filter or action hook.
     *
     * For more information on hooks, actions, and filters, @link http://codex.wordpress.org/Plugin_API
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    # Remove WordPress Version
    	function remove_wp_version() { return ''; }
    	add_filter('the_generator', 'remove_wp_version');
    
    # Remove Version Query Strings From JavaScript JS and CSS Stylesheet Files
    function _remove_script_version( $src ){
    	    $parts = explode( '?', $src );
    	    return $parts[0];
    	}
    	add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
    	add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
    
    // Set up the content width value based on the theme's design and stylesheet.
    if ( ! isset( $content_width ) )
    	$content_width = 625;

    I did that to both twentytwelve and twentythirteen

    What did I do wrong?
    [Use backticks or code button while posting code]

  12. amsgator
    Member
    Posted 8 months ago #

    You didn't. I was just adding it back for others, sorry for the confusion. When I view your page source the generator tag and version is gone, so it worked.

    It only has to be added to the theme you have active.

  13. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    Anyone who still needs help with this issue, I'd suggest starting your own thread per:

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

    When a thread gets this long, it gets quite unwieldy and difficult to tell who still needs help.

  14. Cam
    Member
    Posted 8 months ago #

    For those who are following (or who stumble upon) this thread.

    The first hack (commenting out lines in wp-login.php) is likely to cause a blank white screen if there are legitimate cookie issues with your browser. This stops wp-login.php from checking to see if cookies are enabled and just tries it. If there aren't the cookies set, then white screen and no explanation.

    The function @mirajas and I suggest (do one or the other) simply adds setting the test cookie whenever someone visits any page of the site, so it has more opportunity to get set, and therefore when logging in, it is less likely to flag the error message when it shouldn't.

    I have not tried installing a clean copy of 3.7.1 to know if it has issues. My installs have all been updated (either automatically or manually) to 3.7.1 on each release dating back to pre-3.6.

    It sounds like there may be a problem with fresh installs of 3.7.1, but this is outside the scope of what the OP (@Kevin) was asking about. He could log in on the second or third attempt, but received the cookie error on the first. This was the case in my installation, except for me, the error was limited to only iOS browsers.

    As @WPyogi said, if you are still having a problem with this or a new issue, it would make sense to start a new thread.

  15. chillysky
    Member
    Posted 8 months ago #

    I have a similar problem except I'm running 3.7 and this problem popped up out of the blue on a blog that's been running for years. I've been trying the stuff you guys are suggesting here (thanks @cam, @amsgator for the stream of suggestions :) but nothing seems to work.

    I started my own thread yesterday.
    http://wordpress.org/support/topic/cant-login-error-cookies-are-blocked?replies=3
    Unfortunately not getting much help there at all!! I've been working on this for days. Nothing seems to be working. Hope someone comes up with something that works for everyone who's having this problem.

  16. MariaA
    Member
    Posted 7 months ago #

    Well, it was not any answer on my own tread. So I wil probably wait to 3.7.2 og 3.8. Hope it comes soon.
    Or go for another edtitor.

  17. willem.deboer
    Member
    Posted 7 months ago #

    Same here. No answer to my own thread either :-( I detect little sense of urgency from the WordPress people which is very disappointing.

  18. willem.deboer
    Member
    Posted 7 months ago #

    Just a thought. Could the particular PhP version the webhost is running have anything to do with it?
    My host is running PhP 5.2.17

  19. Cam
    Member
    Posted 7 months ago #

    I'm on PHP 5.3.27
    It's possible, but unlikely in my mind.

  20. Andrew
    Forum Moderator
    Posted 7 months ago #

    Btw it may be worth hiring someone to resolve this if the issue is urgent:
    - http://jobs.wordpress.net/
    - http://directory.codepoet.com/

  21. willem.deboer
    Member
    Posted 7 months ago #

    I was under the impression that this problem is the result of changes in the coding of WordPress 3.7.1. Shouldn't the WordPress people be working on a resolution?

  22. Andrew
    Forum Moderator
    Posted 7 months ago #

    It may be, but the issue may not be resolved within the time you expect as everyone at WordPress is a volunteer (has limited spare time to work on the issue).

  23. esmi
    Forum Moderator
    Posted 7 months ago #

    I was under the impression that this problem is the result of changes in the coding of WordPress 3.7.1

    What gave you that impression?

  24. willem.deboer
    Member
    Posted 7 months ago #

    @esmi because sites that were running perfectly fine started exhibiting this problem after an upgrade to 3.7.1 as the only change.

  25. esmi
    Forum Moderator
    Posted 7 months ago #

    I'm sorry but that does not, of itself, suggest a WordPress core issue. Have you tried:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the default theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    - re-uploading all files & folders - except the wp-content folder and wp-config.php & root .htaccess files - from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

  26. willem.deboer
    Member
    Posted 7 months ago #

    Yes, all of that, except re-uploading. To no avail.

  27. esmi
    Forum Moderator
    Posted 7 months ago #

    Then please post your own topic if you still require assistance. I am now closing this one.

Topic Closed

This topic has been closed to new replies.

About this Topic