Jump to content

302 error when login with correct login/password


LudovicE

Recommended Posts

Hi,

I'm actualy on verry slow hosting, so I try to migrate prestashop version 1.7.8.5 to new hosting. But i've got a problem to login to admin pannel after migration. If I enter wrong information got correct message "invalid password" (or something like that got french version).

But with correct password I'm redirected to login web page.

In network inspector I see

/index.php?controller=AdminDashboard&token=xxx with 302 error not found

Header General

Request Method: GET
Status Code: 302 Found
Remote Address: 193.x.x.x:443
Referrer Policy: strict-origin-when-cross-origin

Response Headers

Content-Length: 0
Content-Type: text/html; charset=utf-8
Date: Thu, 21 Dec 2023 15:02:10 GMT
Location: https://site.be/admin_url/index.php?controller=AdminLogin&token=xxxxxxx&redirect=AdminDashboard
Server: LiteSpeed
Set-Cookie: PrestaShop-yyy=0; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; domain=site.be; secure; HttpOnly; SameSite=Lax
Set-Cookie: PrestaShop-xxx; expires=Sun, 31-Dec-2023 15:02:10 GMT; Max-Age=864000; path=/; domain=site.be; secure; HttpOnly; SameSite=Lax
Vary: User-Agent

Do you have any idea what happened? I made second copy with tar.gz archive, change url to temporary sub domain. Clear cache in /var/cache but don't find the issue.

Your help will be really appreciated

Thanks you and Merry Christmas

 

Ludovic

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

  1. Make sure that the permissions for the /admin folder and its contents are set correctly.
  2. Check the config/defines.inc.php file for any hardcoded URLs or paths. Ensure that the URLs in this file match the new domain and path settings.
  3. In the PrestaShop database, check the ps_configuration table for the values of PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL. Ensure that these values reflect the correct domain.
  4. Check the RewriteBase directive in the .htaccess file. If your PrestaShop installation is in a subdirectory, make sure the RewriteBase is set correctly.
  5. Clear your browser cache and cookies to ensure that the redirection issue is not related to old cached data.

Thanks.

Link to comment
Share on other sites

On 12/21/2023 at 10:24 AM, LudovicE said:

I'm actualy on verry slow hosting, so I try to migrate prestashop version 1.7.8.5 to new hosting. But i've got a problem to login to admin pannel after migration. If I enter wrong information got correct message "invalid password" (or something like that got french version).

If not solved already, the key to convert passwords into hash is different from server to server.
In case your password reset does not work there is a way though to handle that for single accounts. It also means that all your customer need to redo their passwords.

Link to comment
Share on other sites

On 1/1/2024 at 1:06 PM, AddWeb Solution said:

Hi,

  1. Make sure that the permissions for the /admin folder and its contents are set correctly.
  2. Check the config/defines.inc.php file for any hardcoded URLs or paths. Ensure that the URLs in this file match the new domain and path settings.
  3. In the PrestaShop database, check the ps_configuration table for the values of PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL. Ensure that these values reflect the correct domain.
  4. Check the RewriteBase directive in the .htaccess file. If your PrestaShop installation is in a subdirectory, make sure the RewriteBase is set correctly.
  5. Clear your browser cache and cookies to ensure that the redirection issue is not related to old cached data.

Thanks.

Hello, Happy new years!

Thanks for your help !

  1. Directory has 755 chmod and file has 644, I make gzip to migrate all without chmod or file error and use ssh connexion to make gzip and extract it on new server
  2. Don't have any hardcoded url In this file
  3. These value has ben updated to new sub domain for new hosting check
  4. Domain use sub domain but not subdirectory
  5. Already try clear cache and use other browser to check this issue without success

On current hosting I've got CacheMemcached, and I don't know if new hosting has this option, I don't know if this could be the problem? Is it possible to deactivate the option directly in the database?

If you've got other idea don't hesitate 🙂 

Link to comment
Share on other sites

On 1/1/2024 at 1:21 PM, Nickz said:

If not solved already, the key to convert passwords into hash is different from server to server.
In case your password reset does not work there is a way though to handle that for single accounts. It also means that all your customer need to redo their passwords.

Hi,

If I use wrong password to login to admin I've got a message who say "wrong password" but when I use correct password I've got problem explain upper.

 

Thanks you

Link to comment
Share on other sites

  • 4 weeks later...
On 1/5/2024 at 10:37 PM, Nickz said:

moment I give you some intructions over PM

 

On 1/1/2024 at 1:06 PM, AddWeb Solution said:

Hi,

  1. Make sure that the permissions for the /admin folder and its contents are set correctly.
  2. Check the config/defines.inc.php file for any hardcoded URLs or paths. Ensure that the URLs in this file match the new domain and path settings.
  3. In the PrestaShop database, check the ps_configuration table for the values of PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL. Ensure that these values reflect the correct domain.
  4. Check the RewriteBase directive in the .htaccess file. If your PrestaShop installation is in a subdirectory, make sure the RewriteBase is set correctly.
  5. Clear your browser cache and cookies to ensure that the redirection issue is not related to old cached data.

Thanks.

I am getting another 302: /index.php?controller=AdminLogin&token=xxx&redirect=AdminDashboard

Everything above is correct. I create a new user in the database but the new user does the same.

Thanks for your help!

Edited by Nowayme (see edit history)
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...