Prestashop cant login in admin

前端 未结 12 2688
余生分开走
余生分开走 2020-12-15 12:27

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 ever

相关标签:
12条回答
  • 2020-12-15 13:01

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

    0 讨论(0)
  • 2020-12-15 13:02

    I use prestashop 1.4.8.2 I just debuged my back office login loop by changing admin/login.php Just remove seemingly useless conditions in following code.

    if ((empty($_SERVER['HTTPS']) OR strtolower($_SERVER['HTTPS']) == 'off')
         AND Configuration::get('PS_SSL_ENABLED'))
    

    Change with

     if (!Configuration::get('PS_SSL_ENABLED'))
    

    I also cleared cookie and bam it worked. I don't know if it will mess other stuff but I can AT LAST get in my back office. Peace!!

    0 讨论(0)
  • 2020-12-15 13:04

    In case you've moved prestashop from a local version or from another domain, in addition of the classic.

    update ps_configuration table set value="www.myshop.com" where name ="PS_SHOP_DOMAIN";
    
    update ps_configuration table set value="www.myshop.com" where name ="PS_SHOP_DOMAIN_SSL";
    

    Check the table called ps_shop_url, and update domain and domain_ssl field, and physical_url as well.

    Example:

    update ps_shop_url set domain='www.myshop.com', domain_ssl='www.myshop.com', physical_url='/';
    
    0 讨论(0)
  • 2020-12-15 13:05

    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/

    0 讨论(0)
  • 2020-12-15 13:05

    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:

    <?php
    require(dirname(__FILE__).'/config/config.inc.php');
    echo Tools::encrypt($_REQUEST["pw"]);
    

    Don't forget to remove the script from your server once your done!

    0 讨论(0)
  • 2020-12-15 13:05

    Sometimes I get this error when I configured shop domain with non-www and I try to access with www, for example. I like to force all users to have the same url, so I force at .htaccess to enter with www:

    RewriteCond %{HTTP_HOST} !^www.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    
    0 讨论(0)
提交回复
热议问题