Several days ago I couldn't access the admin panel on my site based on prestashop platform. After entering login and password, I was redirected to login page again and everything repeated.
The site is hosted on a dedicated server, where some other prestashop sites I am developing are hosted too. After trying to access the admin panel on these sites I get the same "error".
What do you think, what is problem?
Prestashop ver.: 1.4.7.3 and 1.4.8.2
Server: CentOs, PHP
This is what worked for me: in the adminstration>preferences control panel, set "Check the Cookies IP address" to "No."
http://xbfish.com/tag/auto-logout/
In case you've moved prestashop from a local version or from another domain, in addition of the classic.
Check the table called
ps_shop_url
, and updatedomain
anddomain_ssl
field, andphysical_url
as well.Example:
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 :
PS :
ps_
is my table prefix, you may adapt it to your settings.There are some possible things that could have happened to prevent your old passwords from working. One could be that your _COOKIE_KEY_ changed.
You can try to use the following script to generate a new password hash. You can then replace it in the database in the xxxx_employee table (where xxxx_ is your table prefix). I hope that works for you. In any case: keep a backup of your old hashes.
Here is the small script:
Don't forget to remove the script from your server once your done!
I know this is old but it may help someone, turn errors on by opening /config/config.inc.php.
Look for the line:
change it to:
EDIT: changed a seemingly typo
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
andPS_SHOP_DOMAIN_SSL
inps_configuration
table4/ Manually clear smarty cache : remove all files from
tools/smarty/compile
andtools/smarty/cache
5/ Disable the IP check in
classes/Cookie.php
(this can causes many issues with dynamics IP) : inisLoggedBack()
, 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);