Prestashop cant login in admin

Cvalya picture Cvalya · Jul 4, 2012 · Viewed 56.8k times · Source

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

Answer

zessx picture zessx · Jul 5, 2012

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);