2

Magento 2 login is not working as expected on my centos 7 server. If i enter wrong credentials into the login form and hit submit, the page refreshes and the following happens:
1. No error message is returned
2. The form clears off the inputted login credentials.
3. Customer is not logged in even if the credentials are correct.

I went further to install a fresh Magento 2.2.6 on the same server. I tried to login as a customer, even though I did not register. I expected to get an error feedback but I got the same result as above.

Please note that admin backend login is working fine.

Things I have done
php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy php bin/magento cache:clean

I have also made the following folders writable: generated, var/*, pub/static

I need your help as I have been on this for 3 days. Thanks in anticipation.

Issue has been resolved
I noticed a timezone difference between the database server and application server. I sync the two and it worked.

7
  • Assuming you have deleted the cache before trying the above steps , for me it sounds like its a cookies or session issue , try to delete the session folder and try again (only on development server , not production) , and make sure the cookies settings in Magento admin is set correctly . Sep 20, 2018 at 11:13
  • The cookie settings in Magento admin has the default values. I have deleted the session folder but still not working. Sep 20, 2018 at 12:05
  • Would you provide the cookies values ? also have you checked if there is any disk space issue (it happened to me once because there were no enough space on the disk) Sep 20, 2018 at 12:08
  • Also , does the problem exist on every browser ? Sep 20, 2018 at 12:15
  • I added 'session' => [ 'save' => 'files', 'save_path' => '/var/www/html/var/session', ]. With this, customer login started working in firefox but not in chrome. Also error messages are not being returned in both occasions. Sep 20, 2018 at 14:47

1 Answer 1

0

Please check your cookie options. From the database:

select * from core_config_data where path = "web/cookie/cookie_domain";

Check you have your current domain, if not change it and clear cache.

1
  • I have set the cookie_domain but its still not working. Sep 20, 2018 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.