[SOLVED]Cannot login to Joomla backend as admin

February 11th, 2009 by Andrea Matesi 92134 Views

Recently I encountered a whole load of problems related to Joomla and my new business open source web site.

Here I'm gonna post some general info and experiences, useful to troubleshoot possible joomla problems, especially related to when you're unable to login to the administrator backend (I know how it feels, just free your mind: computers are numbers and circuits).

What I am sharing here is my reaction to frustration, with suggestions and feedback received from the official joomla! forum and the official joomla! italian community (thanks - you know who you are).

please check here: http://forum.joomla.it/index.php/topic,56790.0.html and

and here: http://forum.joomla.org/viewtopic.php?f=431&t=262426

The first thing I feel to suggest you is to check configuration.php and .htaccess files on you site's root.

It's important for configuration.php not to contain any blank lines; also, check this file in respect to the Linux/UNIX text file conventions. On Windows, text file lines' are terminated with a CRLF, on Linux/UNIX instead, the lines of a text file are terminated with just a LF (for a tutorial on what that means, check here: http://usertools.plus.net/tutorials/id/22).

The .htaccess (on the contrary of configuration.php), may contain blank lines, just make sure that, if any, they respect the 'foretold Linux/UNIX text file conventions (lines have to be ended by LFs); also, check and make sure the rules are correct and there are no hidden CRLF after the rules declarations (in case of doubt, restore the original htaccess.txt from an untouched joomla! build).

From my experience, those checks helped me solve my admin loop, cannot login problems; an obvious way to avoid this kind of problems is to become a power user on the Linux side (aka pwrusr), but that's a personal choice! If working directly on your joomla! site with, say, Ubuntu, these problems would'nt have ever happened to any of us (I admit it: I was jerking on my site with my powerful Vista64 gaming rig).

Another useful thing to check for, is to make sure you have the right PHP version: make sure your host is serving you with PHP 5 (since joomla was made with it). How to discover if you have PHP5 if you can't access the admin backend? Well, upload on your site's root the uncompressed file JTSPOST (here: http://joomlacode.org/gf/project/jts/frs/), and open the address corresponding to the copied file's name. Once you open it up, it's gonna give you some useful info about joomla! and your server, included what php version you have.
Please remeber that if you happen to fix your problem, then remove JTSPOST from your server's root, because if you forgive it there, you may leave a possible information security hole.

OK, so, going on, as I said, I checked the joomla! official forums, and referred to them for other possible problems and related suggestions, wich I will report here for the sake of completeness (note that I edited some parts for some added clarity):

Suggestion n.1)

  1. edited the file administrator/components/com_login/admin.login.php to comment out line 69 (//LoginController::display() )
  2. browsed to the login page.
  3. [tried to login] and got an 'Invalid token' message.
  4. Reedited the [administrator/components/com_login/]admin.login.php file to remove my comment at line 69.
  5. Refreshed the login page in my browser and got the normal login form.
  6. Logged in [successfully].

 try this and if it doesn't work, then:

Suggestion n.2) [user inoxfire]

  1. edit file administrator/components/com_login/admin.login.php [to comment out line 57, // JRequest::checkToken('request') or jexit( 'Invalid Token' );]
  2. browsed to the login page.
  3. [tried to login] and got an 'Invalid token' message.
  4. Reedited the [administrator/components/com_login/]admin.login.php file to remove my comment at line 57.
  5. Refreshed the login page in my browser and got the normal login form.

 try this and if it doesn't work, then:

Suggestion n.3)

  1. Log into phpMyAdmin and navigate to the jos_plugins table.
  2. Look for the "User - Joomla!".
  3. Ensure that it is published as mine was not (set published to 1 just in case).
  4. [Look for] in row "Authentication - Joomla"
  5. Ensure that it is published as mine was not (set published to 1 just in case).

 try this and if it doesn't work, then:

Suggestion n.4)
  1. first check your Super Admin status:
    [Open PHPmyAdmin] in the "jos_users" table set SuperAdmin to:
    - field "id" - value "62"
    - field "gid" - value "25" or "26".
  2. in the "jos_core_acl_aro" table find row for "62":
    - field "id" - write this down (should be 10 normally) - this is the "aro_id".
  3. in the "jos_core_acl_groups_aro_map" table find row for "aro_id" = 10
    - "group_id" should be "25" or "26".


If, for some reasons, you need to reset your joomla! admin password, or if you need to offer admin access to somebody else, or for whatever the reason, please change it by doing so:

  1. Open PHPmyAdmin.
  2. access your joomla DB and goto table jos_users.
  3. modify "admin"-row and set it's password code to this: 21232f297a57a5a743894a0e4a801fc3 (it's the equivalent of 'admin').

(for more info and explanations, check this post over here: http://forum.joomla.org/viewtopic.php?t=10985).

Hope this info is useful for everyone, and wish you all have a good time.

Posted in Joomla, WEB | 123 Comments »

123 responses to “[SOLVED]Cannot login to Joomla backend as admin”

  1. kiwiblueNo Gravatar says:

    If you are on Joomla 1.7 then here's my research and solution:
    1. The admin doesn't works when you accidently disables the plugins related to user authentication or login.
    2. Joomla 1.7 doesn't have jos_users table, and instead it stores all plugins in jos_extensions table
    1. Go to jos_extensions table and look for plugins like plg_authentication_joomla, plg_authentication_ldap, com_login and com_users.
    2. Once you find them then make sure they are enabled in jos_extensions table.
    3. Update the enabled column from '0' to '1' for all above columns (plugins) in jos_extensions table, and make sure you hit the 'Go' button to save the updates to database.
    4. Voila, and you are now back to the login admin form.
    The post was helpful to me since it gave me enough pointers to find the exact root cause. However the original solution of this post was for Joomla 1.5 and I had to dig in for Jooma1.7 and managed to fix my problem.

    Thanks everyone for sharing and good luck!

  2. LukeNo Gravatar says:

    KiwiBlue, how do I find jos_extensions - where???  I realised I accidently disabled authentication (i think it was that one) so now I can't log in...... :(

  3. GeneNo Gravatar says:

    KiwiBlue, You saved me.... thanks for this little powerfull tutorial ! worked for me!

  4. kiwiblueNo Gravatar says:

    @Luke - you can find jos_extensions table by going through phpAdmin. Depending on what you have setup in your database, the table prefix may be different than 'jos_'. For example if you've setup as 'xyz' as your DB prefix then you should look into xyz_extensions table.

  5. ErikNo Gravatar says:

    I have tried all the very nice suggestions, but I still have the refreshing log in page every time I try to log in :-(
    Any suggestions?

  6. ChrisNo Gravatar says:

    We're suddenly finding problems logging in to Admin using Firefox 6 . . . no Joomla installation will login correctly now in Admin.
    Works fine in all other browsers so it's not a Joomla problem.

    Any thoughts?

  7. LanaNo Gravatar says:

    Hi there, I am urgently in need of your assistance please. I can't access my admin page as in when i type<sitename>/administrator i am just getting a blank page the same thing happens when I use administrator/index.php.  Can anyone help me please. I am also unable to access the cpanel

  8. AjithNo Gravatar says:

    We've tried all the steps described above and stlll gettting the refreshed login page everytime. Please help!!

  9. VemethNo Gravatar says:

    look to your config ... public $cookie_domain = ''; 

  10. galtconNo Gravatar says:

    thank you
    It has worked for me. I have disabled the plugins accidentally while trying to remove unwanted joomla contents. I enabled the most important log in and i can now log in in the admin page. after almost 24 hours search
    very usefull

  11. @kiwiblue: everything you posted is dead on, but you forgot to include one more flag to check at phpMyadmin. 

    the flag is plg_user_joomla and should be 1 on enabled as well.

    Easiest thing to do, is go jos_extensions on the left menu, select search from the top, and type in the search for all enabled = 0 

    check to see that you either don't see them in your search result, or if you do change enabled to 1 on these records:
    plg_authentication_joomla, plg_user_joomla, plg_authentication_ldap, com_login and com_users
    Voila, you should be able to log in now!

  12. JmarckNo Gravatar says:

    Thanks a lot.. suggestion n.3 worked for me..It really save my time..

  13. AnilNo Gravatar says:

    Super good one, Thank You

  14. JosephNo Gravatar says:

    thanks so much for updating this for joomla 1.7!!! I was just able to login after following your instructions.

  15. chapstoutNo Gravatar says:

    All these need to be enabled
    Thank you all for your help...

  16. AjayNo Gravatar says:

    i'm also not able to access my joomla 1.7 administration, niether from Front end nor from Backend, my colleague just did some changes in php.ini file in WINSCP and after that i'm not able to logging in...i undo the changes done in php.ini file but its of no use....and the administrator page get refresh without showing any login error after i put the login id and password in my joomla Administration page...!! KINDLY HELP!!!!

  17. Tashi WNo Gravatar says:

    I am having the same issue. This is what i get when i go to administrator page. I don't even get to insert user and password. I have noticed that my php file has 'eval(base64_decode("DQplcnJvcl9yZXBvcn........
    Joomla! Administration Login
    Use a valid username and password to gain access to the Administrator Back-end.

  18. AhmadNo Gravatar says:

    It solved my problem ::)

  19. MattNo Gravatar says:

    For what it's worth - Joomla 2.5.1, started experiencing the dreaded Administrator login loop completely out of the blue. Tried all suggestions related to plugins, sessions, domain cookies, etc to no avail. Finally modified configuration.php "public $force_ssl = '1';" and changed it to "public $force_ssl = '0';". That did the trick and I am able to login again via http://mysite.com/administrator (not https). Something gone haywire with the SSL session data, perhaps?

    Thanks for the tips!

    Matt, Traverse CIty, Michigan

  20. amolNo Gravatar says:

    kiwiblue Thank you so much..

  21. SimonNo Gravatar says:

    Suggestion # 4 worked for me.
    Thanks a lot !!!!

  22. Dave TeuNo Gravatar says:

    I have to enable plg_user_profile as well on top of the above mentioned;