The MU forums have moved to WordPress.org

Admin login problem with IE, but not Firefox (7 posts)

  1. benpowers
    Member
    Posted 15 years ago #

    Hi, I have a very strange login problem with my Wordpress MU installation. Login is impossible when using IE, but works fine with Mozilla/Firefox or Opera.

    My first installation was made on a internal subdoman, www1.zzz.com/mublogg and that worked just fine. Login wasn't a problem at all. But then I made another installation on the same server. This time I would make the site public by accessing the site at zzz.com/subblogg so I entered zzz.com in the installation. This caused some problems, I had to change
    $domain = addslashes( $_SERVER['HTTP_HOST'] );
    to
    $domain = "www.zzz.se";
    The original code generated the domain "www1.zzz.com" and that would not work at all when accessing the site from "outside".
    But, now it's impossible to login. When I login I only get a new page with login fileds with the following URL:
    http://www1.zzz.com/mublogg/wp-login.php?redirect_to=http%3A%2F%2Fwww1.zzz.com%2Fmublogg%2Fwp-admin%2F

    It seems that the user get logged in, but therĀ“s something wrong with the cookies so Wordpress Mu won't find them when checking for the them on every wp-admin page.

    Does anyboth know what has gone wrong? Login works for Firefox and Opera and has been working for IE fr the first installation?

    /Gustav

  2. SteveAtty
    Member
    Posted 15 years ago #

    So you've got TWO WMPU installs running on the same server with the code base sitting in different subdirectories in the same primary domain?

    Do those WPMU installs run in subdirectory or subdomain mode?

    The cookies are probably getting confused, or WMPU might well be getting confused, and can you blame it?

    Oh and WMPU is designed to run WITHOUT the www in the URL. So editing code to put it back in might cause problems

  3. benpowers
    Member
    Posted 15 years ago #

    No, I just run one Wordpress MU, the other is not uset anymore.

    I made some debugging code. I write a cookie and then try to read it. Looks like this:

    //Set a cookie now to see if they are supported by the browser.
    setcookie(TEST_COOKIE, 'WP Cookie check', time() + 86400, COOKIEPATH, COOKIE_DOMAIN);
    if ( SITECOOKIEPATH != COOKIEPATH )
    setcookie(TEST_COOKIE, 'WP Cookie check', time() + 86400, SITECOOKIEPATH, COOKIE_DOMAIN);

    echo(TEST_COOKIE);
    echo('
    ');
    if ( empty($_COOKIE[TEST_COOKIE]))
    echo('TOM');
    echo($_COOKIE[TEST_COOKIE]);
    echo('
    ');
    echo(SITECOOKIEPATH);
    echo('
    ');
    echo(COOKIEPATH);
    echo('
    ');
    echo(COOKIE_DOMAIN);
    exit;

    If I use IE I get this:
    wordpress_test_cookie
    TOM
    /mublogg/
    /mublogg/
    .zzz.se

    If I use Firefox I get this code:
    wordpress_test_cookie
    WP Cookie check
    /mublogg/
    /mublogg/
    .zzz.se

    I cant figure out why this differende.

    /G

  4. benpowers
    Member
    Posted 15 years ago #

    Yes, I use subdirectories mode.

    /G

  5. benpowers
    Member
    Posted 15 years ago #

    I added VentureMakers fix to my code:
    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');

    And that solved the problem!!

    /G

  6. hobbleknee
    Member
    Posted 14 years ago #

    I have a similar problem. Nobody can log in IE, but FF works fine.
    I restarted Apache, and then everything worked fine again, but the problem came back a few hours later.

    Any ideas?

  7. andrea_r
    Moderator
    Posted 14 years ago #

    Check all the error logs on the server. If restarting apache temporarily fixes it, then something is going on with the server.

About this Topic

  • Started 15 years ago by benpowers
  • Latest reply from andrea_r