Jump to content

Back Office automatically logs out


Recommended Posts

Hello. I have installed the latest version of Prestashop, but whenever I click on certain features in the Back Office like the modules, it just logs out for no reason.

I have been reading about this issue and it seems to have something to do with the cookies, so apparently I have to go to Advanced Parameters-> Admin and set the option "check cookie IP" to NO. The problem is, I have already tried that but it logs out when I try to save the change.

Other things I have already tried have been: uninstall and reinstall the whole prestashop on my server, and changing the file classes/Cookies.php by comenting the line that you can see strikethrough:

if ($this->id_employee AND Validate::isUnsignedId($this->id_employee) AND Employee::checkPassword(intval($this->id_employee), $this->passwd)

//AND (!isset($this->_content[‘remote_addr’]) OR $this->_content[‘remote_addr’] == ip2long(Tools::getRemoteAddr()))).

None of this options have worked.

Can anybody please help me? I am desperate to solve this, have been working on the problem for hours and still not getting a clue on how to solve it 

 

 

 

Link to comment
Share on other sites

UPDATE: I have tried this new idea that i found on stack overflow:

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

This actually solves the problem with the cookies checking the IP address, now it's set to "NO", but hasn't solved my problem. 

 

Anybody has an idea of what else it could be?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...