Post by DesignCart » Fri Mar 15, 2024 10:02 pm

I am using Opencart version 3.0.3.9. After moving the store from localhost to the production server, there is no possibility of logging in. The login issue affects both administrators and customers. Changing the password using the "Forgot Password" tool also does not work. The store generally operates correctly; orders can be placed, and products can be browsed. Only the login function has stopped working. Does anyone know what's going on? This never happened in Opencart version 3.0.3.8.

Tworzenie sklepów internetowych | Portfolio | Cennik | O mnie


User avatar
Active Member

Posts

Joined
Thu Nov 10, 2016 2:06 pm
Location - Gubin

Post by paulfeakins » Mon Mar 18, 2024 10:18 pm

Could it be the timezone bug? Search the forum for that?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by DesignCart » Tue Mar 19, 2024 6:56 pm

It's not a timezone problem. The default file had a setting for UTC, I changed it to 'Europe/Warsaw' but that didn't help. The store works normally on XAMPP and on another server. The only difference is that on XAMPP and the first server the engine was MyISAM and on the current one InnoDB. Everything works except the login for the client and for the admins. Any ideas? :-\

Tworzenie sklepów internetowych | Portfolio | Cennik | O mnie


User avatar
Active Member

Posts

Joined
Thu Nov 10, 2016 2:06 pm
Location - Gubin

Post by DesignCart » Tue Mar 19, 2024 7:28 pm

I noticed another tip. public function login($username, $password) returns false.

Query $this->db->query("SELECT * FROM " . DB_PREFIX . "user WHERE username = '" . $this->db->escape($username) . "' AND (password = SHA1(CONCAT(salt, SHA1(CONCAT(salt, SHA1(' . $this->db->escape($password) . "'))))) OR password = '" . $this->db->escape(md5($password)) . "') AND status = '1'"); doesn't find the user but the user definitely exists. The database is a copy from a store that works fine and logging in on this data runs smoothly.

Tworzenie sklepów internetowych | Portfolio | Cennik | O mnie


User avatar
Active Member

Posts

Joined
Thu Nov 10, 2016 2:06 pm
Location - Gubin

Post by DesignCart » Tue Mar 19, 2024 7:35 pm

It looks like this Line of code in mysql query is not working: SHA1(CONCAT(salt, SHA1(CONCAT(salt, SHA1(' . $this->db->escape($password) . "')))))

When I gave the password hardcoded everything works as expected. Anyone have an idea how to get around this?

Tworzenie sklepów internetowych | Portfolio | Cennik | O mnie


User avatar
Active Member

Posts

Joined
Thu Nov 10, 2016 2:06 pm
Location - Gubin

Post by ADD Creative » Fri Mar 22, 2024 1:02 am

If the engine is different also check that the field types, lengths and collation are not differnt.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 18 guests