Jump to content

Solution for admin login problem


jumbo

Recommended Posts

Hi all

 

Recently, I've been having a problem when trying to login to my admin panel, I would be asked to login again and again, or after browsing 1 or 2 pages inside my admin panel, I would be asked to re-login.

 

I suspected it was my cookies that had some problem, so I flushed them but the problem never went away.

 

I tried this on FF and Chrome, same problem everywhere.

 

So I googled and found a solution that worked for me. So I'm sharing it:

 

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

 

Solution found at http://stackoverflow.com/questions/11335073/prestashop-cant-login-in-admin

  • Like 5
  • Thanks 1
Link to comment
Share on other sites

  • 8 months later...

I would like to thank you very much jumbo ,

this solved a strange issue on one of my clients shop ( his ip changes every 2-3 seconds !)

PS : starting since ps 1.5 you have to this inside Employee Class not Cookie Class : Employee::isLoggedBack() (around line 214 )

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
  • 4 months later...

Hello,

 

As i posted yesterday it worked. The solution worked on some machine and not in some other. what could be the issue? I am using Prestashop 1.6. Even after set value Check cookie IP to No from BO. but still not working.

 

It is Very urgent.

 

Thanks

Link to comment
Share on other sites

  • 3 months later...

I'm having the same issue I try to login into the dashboard but it keeps coming back to the log on screen.  My developer is away and I have not been able to get into the back end of our website for about a month and we have an issue with the check out screen. Can anyone help with regard to getting into the dashboard?  I am not tech savvy. URGENTLY NEED HELP PLEASE

Link to comment
Share on other sites

Hi all

 

Recently, I've been having a problem when trying to login to my admin panel, I would be asked to login again and again, or after browsing 1 or 2 pages inside my admin panel, I would be asked to re-login.

 

I suspected it was my cookies that had some problem, so I flushed them but the problem never went away.

 

I tried this on FF and Chrome, same problem everywhere.

 

So I googled and found a solution that worked for me. So I'm sharing it:

 

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

 

Solution found at http://stackoverflow.com/questions/11335073/prestashop-cant-login-in-admin

 

 

I'm having the same issue I try to login into the dashboard but it keeps coming back to the log on screen.  My developer is away and I have not been able to get into the back end of our website for about a month and we have an issue with the check out screen. Can anyone help with regard to getting into the dashboard?  I am not tech savvy. URGENTLY NEED HELP PLEASE

 

Hi tallum, did you read/follow the solution by jumbo?  If your developer has been away for one month plus, then you might consider finding another. :)

Edited by El Patron (see edit history)
Link to comment
Share on other sites

Hi tallum, did you read/follow the solution by jumbo?  If your developer has been away for one month plus, then you might consider finding another. :)

Thanks El Patron, I have tried to follow Jumbos solutions but dont know where to find 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'))

 

I can't get into the dashboard to change the above

 

Developer is back in 2 weeks :-(

Edited by tallum (see edit history)
Link to comment
Share on other sites

Thanks El Patron, I have tried to follow Jumbos solutions but dont know where to find 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'))

 

I can't get into the dashboard to change the above

 

Developer is back in 2 weeks :-(

 

Hi, you would need  to access the classes/Cookie.php via FTP or file editor from hosting control panel for this particular 'hack'  (note make a back up of the file before changing).  Note: it is not possible to edit this file directly from you back office...

 

also from you original description, and review of the original topic I think you may have different issue.  I suggest opening a new topic in the configuration section to get full community review...because when you post on older topic only those that originally posted see it.

  • Like 1
Link to comment
Share on other sites

Hi, you would need  to access the classes/Cookie.php via FTP or file editor from hosting control panel for this particular 'hack'  (note make a back up of the file before changing).  Note: it is not possible to edit this file directly from you back office...

 

also from you original description, and review of the original topic I think you may have different issue.  I suggest opening a new topic in the configuration section to get full community review...because when you post on older topic only those that originally posted see it.

Thank you

  • Like 1
Link to comment
Share on other sites

hello intrinizic,

firstly, try to clear shop cache manually

 

 

  1. To clear cache manually, you need to access your Prestashop installation directory and delete the content of the following folders: cache/smarty/compile. ...
  2. Delete all the files in the folders, except of index.php.
  3. Reload your website in browser to take a look at the changes you have made.
  • Like 1
Link to comment
Share on other sites

  • 9 months later...
Guest cornelm

Hi guys,

 

After upgrading to the last version (1.6.1.8) I can't login to admin panel anymore. "Log in" text from the log in button doesn't appear - maybe this could be a clue.

I try:

- clear cache (from cpanel) cache/smarty/compile etc

- acces from mobile (same problem)

- clear browser (Firefox) and try even from Edge, Chrome

 

What can I do? Maybe some file permission to change?

Thanks!

post-338168-0-77630700-1478074585_thumb.jpg

post-338168-0-39580500-1478074588_thumb.jpg

Edited by cornelm (see edit history)
Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

 Hi Guys,

This problem is still contiune for some people.

For solution try this:

 - Open; phpMyadmin, ps_configuration table

 - Find, PS_COOKIE_CHECKIP and set it as 0

 - Clear cache then try again, probably it will be solved.

You can think that it is related to IP/network issue.

  • Like 1
Link to comment
Share on other sites

this happened to my original module shope, etiendsa.co....drove me bloody crazy as I could not login from my home office ip, like for months

one day I emptied via phpmyadmin the three _connections table and bam, I could log in.

there is not big issue empyting these tables....

hopefully this helps someone as well

el

  • Like 1
Link to comment
Share on other sites

  • 7 months later...

d

On 12/19/2019 at 1:00 AM, El Patron said:

this happened to my original module shope, etiendsa.co....drove me bloody crazy as I could not login from my home office ip, like for months

one day I emptied via phpmyadmin the three _connections table and bam, I could log in.

there is not big issue empyting these tables....

hopefully this helps someone as well

el

hi i have same problem but in my phpadmin i  cant find PS_COOKIE_CHECKIP

plz help

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

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...