Joomla Administrator Login Redirects Back to Login Page Without Errors

Yesterday, we had a new customer, from Denmark, with a very nice Joomla website, asking us to fix one of the most annoying Joomla problems. The problem was that whenever he tried to login from the backend, he was getting redirected back to the login page without any error. He was confident that the username and the password were correct and he was very troubled by the fact that he wasn’t able to login to his own website.

When the backend login redirects back to the login page with no errors, then this means that the problem is not with the credentials but somewhere else. Luckily, we did have the same exact symptoms before on another Joomla website and so we thought we’d be able to fix the issue instantly. But we were wrong…

The problem had nothing to do with a disabled plugin or with the session.save_path. The problem had to do with something else. So, what we did was that we set the $error_reporting variable to “maximum” in the configuration.php file (which is located under the root directory of the Joomla website) and we tried again. Of course, it still didn’t work, but this time we saw the following messages:

Notice: session_start(): Server localhost (tcp 20046) failed with: Connection refused (111) in /home/[user]/public_html/libraries/joomla/session/session.php on line 665

Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /home/[user]/public_html/libraries/joomla/session/session.php:665) in /home/[user]/public_html/libraries/joomla/session/session.php on line 665

Hmmm! It seems that for some reason, Joomla was trying to store the sessions in an alternative location (usually, Joomla stores the sessions in the database). So we took a closer look at the configuration.php file and we noticed the following line:

public $session_handler = 'memcache';

Aha! Joomla was trying to use memcache to store the sessions, but it was unable to (seemingly because of connection issues, or maybe because memcache doesn’t even exist on that server).

So, in order to solve the problem, we just switched the session handler to database, by changing the above line (again, in the configuration.php file) to:

public $session_handler = 'database';

And that fixed the problem!

But, what caused the session handler to switch to memcache?

We’re not 100% sure, but we suspect it was a user error (e.g. the Joomla super user mistakenly changed it to memcache).

So, if you’re trying to login to your website but you keep getting redirected to the login page (with no errors being displayed), then a good start would be to check the $session_handler variable in your configuration file. If that doesn’t help, then check the #__extensions table (in the database powering your Joomla website) and make sure that the appropriate plugins are enabled (mainly the plg_user_joomla). If that still doesn’t fix the problem, then we’re here to help. All you need to do is to contact us and we’ll fix the problem for you as soon as we can and for a really, really competitive fee!

3 Responses to “Joomla Administrator Login Redirects Back to Login Page Without Errors”
  1. Comment by Michiel Kuijs — June 29, 2015 @ 5:30 am

    This solution did not work for my (3.x) website… I have the same problem but the configuration file was OK:

    public $session_handler = 'database';

    Any other suggestions?

  2. Comment by Fadi — October 6, 2015 @ 1:33 pm

    Hi Michiel,

    My apologies in the delay in getting back to you…

    Have you checked this post: http://www.itoctopus.com/byte-order-mark-bom-joomla-and-why-you-cant-login-to-your-website ? If you’re using UTF-8 with signature then this might be the issue.

  3. Comment by Darus — July 10, 2019 @ 11:52 am

    Thanks, saved a massive amount of time and searching.

Leave a comment