WordPress.org

Ready to get started?Download WordPress

Forums

Log-in loop (13 posts)

  1. sashen
    Member
    Posted 3 years ago #

    Upgraded to 3.0.4 and now when I go to http://iamcourse.com/iam/wp-login.php, type in my user/pass... and, instead of logging me in, I'm redirected to http://iamcourse.com/iam/wp-login.php?redirect_to=http%3A%2F%2Fiamcourse.com%2Fiam%2Fwp-admin%2F&reauth=1 and asked to log in again.

    Just caught in a loop.

    (you won't be able to go to that page, since the /iam folder is password protected)

    Contact me directly if you need access.

    I've tried renaming/deleting the plugins folder and themes folder... no difference.

  2. ucfknight10
    Member
    Posted 3 years ago #

    ive had this problem before, but disabling the plugins and themes has always worked for me. is reinstalling WP an option?

  3. sashen
    Member
    Posted 3 years ago #

    Already re-installed.

    In fact, that's what set it off.

    I followed the directions for upgrading to 3.0.4 (which I did in 6 other installations with no problem), and then got this problem.

  4. ucfknight10
    Member
    Posted 3 years ago #

    in wp-config.php, enter this code

    define('WP_DEBUG',true);

    and see if it generates any errors.

  5. sashen
    Member
    Posted 3 years ago #

    Do I need to put that line anywhere in particular?

    I ask because I added it and got no errors.

  6. ucfknight10
    Member
    Posted 3 years ago #

    hmm, i am kind of at a loss as to what the problem could be then.

    one last thought: try disabling your password protection on the folder, and see if it works then. i'm not saying it will, but let's just be sure that it's not interfering.

  7. sashen
    Member
    Posted 3 years ago #

    Sadly, that was the first thing that I tried.

  8. ucfknight10
    Member
    Posted 3 years ago #

    ok. after logging in, and it redirects you back to the login page, manually type in the path to the admin (wp-admin). when i had this problem, sometimes it would work.

  9. sashen
    Member
    Posted 3 years ago #

    If I enter domain.com/wp-admin or domain.com/wp-admin/index.php, those both redirect to domain.com/wp-login.php and I'm in the loop

  10. ucfknight10
    Member
    Posted 3 years ago #

    ok, next step is to figure out where the error is actually occurring. i'm assuming you are familiar with php and wordpress. you need to find the code that processes the login, and create some sort of method of determining where the script actually get's caught.

    it can be something as simple as echoing your way through the alphabet every few lines of code (when it makes sense), or something more elaborate. just make sure you call the exit function at some point, to keep the script from redirecting back to the login page.

  11. sashen
    Member
    Posted 3 years ago #

    I know just enough php and wp to be dangerous... but not enough to do what you're suggesting.

    :-(

  12. ucfknight10
    Member
    Posted 3 years ago #

    well, i'm out. aside from actually sitting down and working through it, i've got nothing else to suggest.

    you may want to take a chance, and learn a bit more about how wordpress works. tear it apart, touch it's insides. :) to diagnose your problem, open up wp-login.php, and follow it's path of functions and commands. having a powerful search program will help locate function definitions and such.

  13. Innocent Bystander
    Member
    Posted 2 years ago #

    Hi there,

    i'm having the exact same problem with the latest version 3.2.1 (First install, default installation, no plugins, followed the steps in install guide), WP_DEBUG wont give me any useful info and yes, i already spent all day looking on the internet for "wordpress login loop".

    After a bit of digging in the source code, TamperData and Firebug i found out that i am redirected from wp_login.php to /wp-admin/ and then back to wp_login.php again without any error message or useful information.
    As far as i can see it, the problem exists in /wp-includes/pluggable.php at function auth_redirect(), somewhere around line 824:

    if ( $user_id = wp_validate_auth_cookie( '', $scheme) ) {

    What is this? $user_id has not been defined or declared global inside this function (or am i missing something here?), hence it always skips this block and continues further down at // The cookie is no good so force login, kicking me back to wp-login.php and the the loop starts again.
    I can confirm that 2 cookies are set: wordpress_test_cookie = WP+Cookie+check and PHPSESSID = 161293d38543c1745381e6d939b957ee, and there is an empty (0 Bytes) session file sess_161293d38543c1745381e6d939b957ee in my php session folder, and the cookie-host is equal to whats set in tbl wp-options under siteurl and home.

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.