Update from version 2.4.1 to 2.5 - Login error

Post Reply
AchLive
Posts: 108
Joined: 10 Jan 2017, 15:38
Name: Achille
Location: Italy

Update from version 2.4.1 to 2.5 - Login error

Post by AchLive »

Hi everyone, after updating from version 2.4.1 to version 2.5 I get the following error after entering username and password.

Code: Select all

Database Error: 1062 - Duplicate entry '0' for key 'PRIMARY'
Query: insert into app_users_login_log (users_id, username, identifier, is_success, date_added) values ('1', '[MyAdmin]', '::1', '1', '1560959215')
Page: /001_MySITES/Project/index.php?module=users/login&action=login
After having overwritten all the files from rukovoditel_2.5.zip and rukovoditel_ext_2.5.zip I have successfully the update works
http: 001_MySITES/Project/install/autoupdate/from_2.4_to_2.5.php
and
http: 001_MySITES/Project/install/ext_autoupdate/from_2.4_to_2.5.php
What can this error depend on?
Thanks for the support
User avatar
support
Site Admin
Posts: 6231
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Update from version 2.4.1 to 2.5 - Login error

Post by support »

This is something unusual. Try to reset table app_users_login_log in phpmyadmin.
AchLive
Posts: 108
Joined: 10 Jan 2017, 15:38
Name: Achille
Location: Italy

Re: Update from version 2.4.1 to 2.5 - Login error

Post by AchLive »

Thanks for the reply.
The problem occurs when I move the installation from server to localhost.
On the server it works fine but if I install the same version in localhost it reproduces the error.
I tried to clear the app_users_login_log table in phpmyadmin but the problem remains.
Thanks for the support
AchLive
Posts: 108
Joined: 10 Jan 2017, 15:38
Name: Achille
Location: Italy

Re: Update from version 2.4.1 to 2.5 - Login error

Post by AchLive »

After deleting the data in the table app_users_login_log I can only make one login, at the second access the error is returned.

Code: Select all

Database Error: 1062 - Duplicate entry '0' for key 'PRIMARY' .........
I think I understood that ID "0" is always assigned to each access and therefore the error refers to the primary key that cannot be duplicated. The strange thing is that it only happens in localhost and not on the server.
Thanks for the support
User avatar
support
Site Admin
Posts: 6231
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Update from version 2.4.1 to 2.5 - Login error

Post by support »

Something is wrong with this table... Just remove it from phpmyadmin and then run next query:

Code: Select all

CREATE TABLE IF NOT EXISTS `app_users_login_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `users_id` int(11) DEFAULT NULL,
  `username` varchar(255) NOT NULL,
  `identifier` varchar(255) NOT NULL,
  `is_success` tinyint(1) NOT NULL,
  `date_added` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_users_id` (`users_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
AchLive
Posts: 108
Joined: 10 Jan 2017, 15:38
Name: Achille
Location: Italy

[SOLVED]Re: Update from version 2.4.1 to 2.5 - Login error

Post by AchLive »

Thanks, now it works correctly.
wingedpotato
Posts: 330
Joined: 16 Jan 2018, 06:10
Name: Andy
Location: Indonesia

Re: Update from version 2.4.1 to 2.5 - Login error

Post by wingedpotato »

Hello support,

My question maybe out of topic but, do I need to install version 2.5 from 2.4.1 or straight 2.5.1...?
Post Reply