Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 858 Vote(s) - 3.48 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Prestashop cant login in admin

#1
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
Reply

#2
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!
Reply

#3
I know this is old but it may help someone, turn errors on by opening /config/config.inc.php.

Look for the line:

ini_set('display_errors', 'off');

change it to:

ini_set('display_errors', 'on');

EDIT: changed a seemingly typo
Reply

#4
I had the same issue as everyone else.

I was able to login via IE but not firefox.

What I did to remedy the issue was go into cookie manager and delete all the cookies.

I know it sounds cliche but nothing else worked.

I searched for my site name and looked at the cookie, it was dated long but no longer active. My guess was I corrupted the cookie or maybe they do IP matching, because in the middle of using the admin panel, I switched to my phone browser to check something. Upon return, it would just loop the login page, no error.

I think they need to fix the issue from the software standpoint.

Regardless, after I deleted all the cookies associated with my site, I got right back in no problem. It also resolved an issue I was having with

[To see links please register here]

and mysite.com. I was talking to tech support because sometimes it would work and other times it wouldn't. Maybe the cookie also stores which variant of www/non was used for dynamic linking. My DNS was allowed time to resolve and tech support blamed that but it wasn't that.

Don't just clear cookies, go manually delete the ones for your site. When I used the clear cookies, it didn't delete a lot of cookies. I found that my site still had 9 cookies set AFTER the clear cookies. Whether that was my error or something else, I won't know.

Good luck to all and thanks for the other suggestions. If it returns, I'll go into the other suggestions and report back.
Reply

#5
This is what worked for me: in the adminstration>preferences control panel, set "Check the Cookies IP address" to "No."

[To see links please register here]

Reply

#6
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 ^(.*)$

[To see links please register here]

.%{HTTP_HOST}/$1 [R=301,L]
Reply

#7
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='/';
Reply

#8
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!!
Reply

#9
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);`
Reply

#10
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 :

UPDATE ps_configuration SET value = 0 WHERE name='PS_COOKIE_CHECKIP';

PS : `ps_` is my table prefix, you may adapt it to your settings.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through