Prestashop cant login in admin
Here is some things you can try :
1/ Clear your browser cache and your cookies
2/ Try using Firefox instead of Chrome (which seems have some unexpected problems)
3/ Check PS_SHOP_DOMAIN
and PS_SHOP_DOMAIN_SSL
in ps_configuration
table
4/ Manually clear smarty cache : remove all files from tools/smarty/compile
and tools/smarty/cache
5/ Disable the IP check in classes/Cookie.php
(this can causes many issues with dynamics IP) :
in isLoggedBack()
, remove or comment the fourth condition :
AND (!isset($this->_content['remote_addr']) OR $this->_content['remote_addr'] == ip2long(Tools::getRemoteAddr()) OR !Configuration::get('PS_COOKIE_CHECKIP'))
6/ Make the expire time shorter for cookies (IE can have issues with longest time cookies) : in classes/Cookie.php
constructor,
set : $this->_expire = isset($expire) ? (int)($expire) : (time() + 3600);
instead of $this->_expire = isset($expire) ? (int)($expire) : (time() + 1728000);
I had the same issue after adding a NGINX as reverse proxy in front of my Apache web server.
The problem was from the « Check the IP address on the cookie » parameter set to « yes ». Since i was locked out from admin and could not change it, i did it directly in the database with this SQL request :
UPDATE ps_configuration SET value = 0 WHERE name='PS_COOKIE_CHECKIP';
PS : ps_
is my table prefix, you may adapt it to your settings.
I spent a lot of time debugging this. Installed prestashop locallly on my computer. I my case the following, you should manually navigate to the following:
< domain >/admin/index.php