• Hi,

    @wp Administration folks! Please help!

    The following two posts are very similar to the issue I’m experiencing but there seems to be no resolve, so I figured I’d open a new post with more details, to get the attention of someone who could possibly fix the problem, as I’m without a very important blog 4 days counting;

    https://www.ads-software.com/support/topic/226559 (post by: Digg50)
    https://www.ads-software.com/support/topic/224318 (post by: guioconnor)

    My setup:

    Hosted by 1and1.co.uk, using MySQL5.0, upgrading from 2.6.5 ==> 2.7

    Problem:

    After upgrading from 2.6.5 ==> 2.7 successfully which is what it WP told me, I’m left with a login page that reloads each time I enter the correct username and password. And gives me error messages when enter incorrect username or password.

    I go to https://www.xxx.com/wp-admin (or wp-login), enter my login credentials and the page reloads with the following url now:

    https://www.xxx.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.xxx.com%2Fwp-admin%2F

    And as I mentioned I get the same login page, no errors, nothing.

    What I have tried before this post:

    I’ve almost reached the end of going through every single post related to the similar issues with no luck and kind of lost as to where I go from here. In summary I’ve done the following;

    Clearing cache, cookies, disabling firewall, different computers, different browsers, removing my plugins folder and replacing it with just a empty plugins folder, and updating and making sure my config files are correct and checking my DB urls as this site explains https://www.tamba2.org.uk/wordpress/site-url/ all with no luck.

    I don’t know to much about cookies but guessing that its related to this, but don’t know how to fix it; using the Firefox Web Developer Toolbar, I found the following results if these are any use to anyone who may be able to resolve this problem;

    The authentication cookie is being set in the response after sending the initial login request which appears to work, but is not being sent back in the subsequent request.

    I tried setting the cookies manually (the ones provided in the response header) using web developer toolbar and reloading the admin page. Doing this gave me the ‘Please log in again.’ message which we had not been previously seeing, but had been posted about in the WP forum.

    Can anyone help knowing this information? WP folks, please chime in as I have been through a lot of forum posts and not had much luck.

    Thanks all.

Viewing 4 replies - 31 through 34 (of 34 total)
  • Yay! Worked for me, thanks a million!!

    robertkmitchell

    (@robertkmitchell)

    For what it is worth, I had a similar problem (hours of frustration, bleeding eyeballs, etc.) So I followed the link to the PHP admin info. Bottom line, my wordpress url was https://mysite.com/wordpress. Ooops. I changed it to https://www.mysite.com/wordpress and all is now well.

    Dear God, after reading all of these I realize I am a complete neophyte – or stupid. I code in the most basic fashion, so wanting to upgrade my site after reading this seems ridiculous. I’m going to lose everything, including my mind.

    I think I better hire someone.

    I just installed WordPress for the first time and I am completely amazed at all the problems. Same issues, release after release which are tagged in the forums as resolved.

    Initially my pages didn’t even show up until I found this plugin (which of course isn’t even listed in the plugins).
    Plugin Name: Disable Canonical URL Redirection
    https://txfx.net/files/wordpress/disable-canonical-redirects.phps

    As for the logging in issue, what is happening is that the cookies are not being sent with the header redirection.

    Many users have also indicated that their installation worked fine for a few months before this error started occurring. Which I’m sure was a result of clearing or deleting their cookies (because they were never actually logged out).

    Once you do get logged in, you may also have noticed that when you logout you are not actually logged out. After you have clicked the logout link you are redirected back to the login page (which is what should happen). If you simply change wordpress/wp-login.php to wordpress/wp-admin/ in the address bar, you are logged in with out having to provide any credentials. This to is a result of the logout redirection header not sending the cookies to destroy the cookies in the browser.

    The code I have included here is nothing less than a hack but does force the cookies to be sent which in turn allows you to log in and out correctly.

    In wp-login.php:
    first go to the case ‘logout’ : section and add

    if ( isset($_COOKIE[TEST_COOKIE]) ) {
      if($_COOKIE[TEST_COOKIE] == "set")  { //LOGGED_IN_COOKIE
      setcookie(TEST_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
      exit("<div style='text-align:center; color:red;'>Click refresh to continue...</div>");
      }
    }
    wp_safe_redirect($redirect_to);

    Then locate the case ‘login’ : section and add

    if ( isset($_COOKIE[TEST_COOKIE]) ) {
      if($_COOKIE[TEST_COOKIE] != "set")  {
        setcookie(TEST_COOKIE, 'set', 0, COOKIEPATH, COOKIE_DOMAIN);
        exit("<div style='text-align:center; color:red;'>Click refresh to continue...<br />$redirect_to</div>");
      }
    }
    wp_safe_redirect($redirect_to);

    Note: new code is the stuff above the line containing:
    wp_safe_redirect($redirect_to); in both cases.

    As I said this is a Hack but until the developers fix it properly you will be able to log in and out properly.

    So far the 5 minute install is in excess of 40 hours.

    I also installed MovableType. After I upgraded the required perl modules it was up and running perfectly.

    Although I prefer the PHP environment over Perl, from what I have read in the forums about ongoing unresolved issues release after release and some in excess of a year I find myself “HardPressed to recommend WordPress” to any body.

    Hopefully this Hack will allow some of you to login.

    Regards

Viewing 4 replies - 31 through 34 (of 34 total)
  • The topic ‘Upgrade to 2.7; Login reloads login page’ is closed to new replies.