Debugging failed admin logins

  • Simon Hobson

    Simon Hobson - 2012-11-01

    I've upgraded a server from Debian Squeeze to Wheezy, now I can't login to the PDA admin page. I'm fairly certain it's not a PFA specific problem as it affects Squrrelmail as well. I know the username/password is OK as I can log in to Roundcube fine.
    I've had this before with Suirrelmail, and from memory I had to force install a slightly older PHP version - but since there's now quite a large difference in versions I don't want to put those old ones back in.

    Any suggestions on how to go about debugging this ?
    Or suggestions for a better forum to ask for help in ?

  • Christian Boltz

    Christian Boltz - 2012-11-01

    This sounds like you might have a problem with the session cookie.

    First check the error_log if it contains something

    Then create a small test file ("cookie.php", in the same directory as postfixadmin) to find out if session cookies work in general:

    echo session_id() . "<pre>";
    $_SESSION = 'works';

    Open cookie.php in your browser _twice_. The first time, you should see a session id and an empty array. The second time, you should see the same session id, and additionally the array should contain 'foo' => 'works'. If you get a different result, check the session-related settings in your php.ini (or your apache config if you override it there).

    If you are unsure if your browser sends back the session cookie, check it with var_dump($_COOKIE)

  • Simon Hobson

    Simon Hobson - 2012-11-02

    That worked - second time I got the  'foo' => 'works' bit.

    But really strange - this morning, both logins work. Very odd :-/

    Now off to see if I can break everything again by upgrading the backend DB server :D

  • Agon S. Buchholz

    I'm encountering a similar issue after some changes in our network infrastructure; Postfix works fine, and Postfix Admin used to work fine. I can run through the "Postfix Admin Setup Checker" (setup.php), which reports: "Everything seems fine. […] Database is up to date". However, I can not login as superadmin, and I have not lost my password.

    I created the "cookie.php" file as instructed above; when loading the file for the second time, I'm not getting 'foo' => 'works', but something like: "bar array(0) {}".

    My suspicion is that something happens to the session cookies, because Postfix Admin is behind a reverse proxy (Varnish). Is this possible and what could I do about it?



Log in to post a comment.