[TYPO3] Cannot log in to backend on first attempt

Ricardo Pereira ricardo at tdwg.org
Fri Jul 6 01:31:07 CEST 2007


    Hi all,

    I've set up Typo3 4.1.1 on SourceForge and for some strange reason I 
can never log in to the backend on the first attempt. It always fails. 
After the first attempt I can get in if I try it again right away, but 
sometimes it takes 3 or 4 attempts.

    I tried to trace the code all the way to line 1065 of file 
t3lib/class.t3lib_userauth.php, which I copy below:

if ($this->challengeStoredInCookie)    {
    session_start();
    if ($_SESSION['login_challenge'] !== $loginData['chalvalue']) {   // 
<======================== THIS IS THE LINE I'M REFERRING TO!!

        if ($this->writeDevLog)     t3lib_div::devLog('PHP Session 
stored challenge "'.$_SESSION['login_challenge'].'" and submitted 
challenge "'.$loginData['chalvalue'].'" did not match, so authentication 
failed!', 't3lib_userAuth', 2);
        $this->logoff();
        return FALSE;
    }
}

    Sometimes, the $_SESSION variable is empty when the login is taking 
place and thus the test above fails.

    The very same setup works fine on my workstation, so I assume there 
is something in SF that is preventing the session variable from being 
set correctly. What is odd is that it works after the first attempt, but 
I don't know why.

    I would greatly appreciate if anyone could shed a light on this 
obscure problem I'm having.

    Cheers,

Ricardo

   

   


More information about the TYPO3-english mailing list