Can no longer log into admin panel

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Can no longer log into admin panel

Post by wmdvanzyl »

Hi All.

I can't seem to log in to the admin panel on this website.

I have tried the following possible solutions without success:
* Forgot password link (even though email sending is set up and working)
* Reset password in database (newest version as found here)
* Clearing cache inside tmp folder on server
* Clearing browser cache

None of these have worked. Trying to log in doesn't even give an error, it just reloads the page.

Any advice would be much, much appreciated!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Can no longer log into admin panel

Post by Rolf »

Just wondering, do you use the AdminIPLock module to secure your backend?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Can no longer log into admin panel

Post by wmdvanzyl »

Hi Rolf. Good question. Unfortunately, in South Africa, we don't have the luxury of static IP's, so it's very difficult for me to do that.

EDIT: Is there anything else i can try to regain access?

EDIT: How can i add a user with SQL? How would i alter this query?

Code: Select all

update cms_users set password = (select md5(CONCAT(IFNULL((SELECT sitepref_value FROM cms_siteprefs WHERE sitepref_name = 'sitemask'),''),'NEW_PASSWORD'))) where username = 'USER_NAME'
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Can no longer log into admin panel

Post by Rolf »

So, you don't use that or a similar module...

At the moment I can only think of trying to login from another computer. Maybe there is still some kind of caching thingy around...

Now that I think of it. When you tried to log in and the Login screen appears again. Just try to open yourwebsite.com/admin/index.php What happens than?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: Can no longer log into admin panel

Post by Jo Morg »

@wmdvanzyl: may I ask what version of CMSMS are you running?
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Can no longer log into admin panel

Post by wmdvanzyl »

Jo Morg wrote:@wmdvanzyl: may I ask what version of CMSMS are you running?
2.1.6

@Rolf - I have tried different browsers - i will try different computers next. And there's no defacing or unwanted files. I can access the files on the server and the database and everything is fine. I just can't access the backend. The site also looks fine.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Can no longer log into admin panel

Post by Rolf »

Rolf wrote:Now that I think of it. When you tried to log in and the Login screen appears again. Just try to open yourwebsite.com/admin/index.php What happens than?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: Can no longer log into admin panel

Post by Jo Morg »

wmdvanzyl wrote:
Jo Morg wrote:@wmdvanzyl: may I ask what version of CMSMS are you running?
2.1.6
Then try the following:
  • - try to login once and wait for the page to reload;
  • - if the login page reloads without an error then it means that you ARE logged in, but that the redirection just didn't occur, so try to access the url: <siteroot>/admin immediately after the attempt to login;
If that works, it means that you have run into a rare conjugation of factors that trigger a minor bug on login redirection. IIRC it has been fixed for CMSMS 2.2.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: Can no longer log into admin panel

Post by Jo Morg »

Well yeah that was what I was thinking but, RolfTJ, you just beat me to it... :)
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Can no longer log into admin panel

Post by wmdvanzyl »

Rolf wrote:
Rolf wrote:Now that I think of it. When you tried to log in and the Login screen appears again. Just try to open yourwebsite.com/admin/index.php What happens than?
Sorry Rolf, i forgot to respond to this one. It just leaves me back at the login page. Can i PM you the username an password to see for yourself?

EDIT: I apologise if it sounded as if i want you to solve my issue for me. That was not my intention. I just don't know if i am expressing all the details correctly.
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Can no longer log into admin panel

Post by wmdvanzyl »

Contents of config.php just for reference:

Code: Select all

<?php
# CMS Made Simple Configuration File
# Documentation: /doc/CMSMS_config_reference.pdf
#
$config['debug'] = false;
$config['timezone'] = 'Africa/Johannesburg';
$config['dbms'] = 'mysql';
$config['db_hostname'] = 'localhost';
$config['db_username'] = '*****';
$config['db_password'] = '*****';
$config['db_name'] = '*****';
$config['db_prefix'] = 'cms_';
$config['admin_dir'] = 'admin';
$config['url_rewriting'] = 'mod_rewrite';
$config['permissive_smarty'] = 1;
$config['root_url'] = 'https://modh.co.za';
?>
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Can no longer log into admin panel

Post by wmdvanzyl »

*** UPDATE ***
I noticed that pretty URL's were also not working. So i headed to .htaccess to investigate.

I commented out everything except the pretty URL parts and voila! I have access to backend!

Code: Select all

# Rewrites urls in the form of /parent/child/grandchild but only rewrites if the requested URL is not a file or directory.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>

# Link to www.modh.co.za then redirect to modh.co.za
#RewriteCond %{HTTP_HOST} ^www\.modh\.co\.za [NC]              
#RewriteRule ^(.*)$ https://modh.co.za/$1 [L,R=301]

# Link to http://website,com then redirect to http://www.website.com
#RewriteCond %{HTTP_HOST} ^modh\.co\.za [NC]
#RewriteRule ^(.*)$ https://www.modh.co.za/$1 [L,R=301]

# Force HTTPS
#RewriteCond %{HTTPS} !=on
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
I'm guessing one of those rules aren't correct or they are clashing. I am not an Apache redirect expert to say the least! ::)
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Can no longer log into admin panel

Post by velden »

If you have root_url and or admin_url defined in config.php then make sure they have the proper values (starting with https://www.modh.co.za)

Code: Select all

# Link to www.modh.co.za then redirect to modh.co.za
#RewriteCond %{HTTP_HOST} ^www\.modh\.co\.za [NC]             
#RewriteRule ^(.*)$ https://modh.co.za/$1 [L,R=301]

# Link to http://website,com then redirect to http://www.website.com
#RewriteCond %{HTTP_HOST} ^modh\.co\.za [NC]
#RewriteRule ^(.*)$ https://www.modh.co.za/$1 [L,R=301]
I'm kind of surprised this doesn't cause a redirection loop..

If it starts with www. then remove the www. and then if it doesn't start with www. then redirect to www. To me it seems like a loop condition. But I might be missing something here.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Can no longer log into admin panel

Post by Rolf »

The SSL/www redirect rules in this post work for me
https://www.cmscanbesimple.org/blog/set ... ade-simple
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Can no longer log into admin panel

Post by wmdvanzyl »

velden wrote: I'm kind of surprised this doesn't cause a redirection loop..
You are correct sir, but i only had one uncommented. I had just pasted both in from the docs and then decided to use the non-www route, so i commented the other one out.

;D
Rolf wrote:The SSL/www redirect rules in this post work for me
https://www.cmscanbesimple.org/blog/set ... ade-simple
Thanks Rolf - your blog is invaluable!

I think the problem lies with that "Force https" rule. I already have https set on all the content pages and i have all the certificates in place. So perhaps that rule isn't necessary. I will test it a bit later. For now keeping that rule out gives me access and that make me very, very happy.
Locked

Return to “CMSMS Core”