Roundcube 1.5.2 update

I tried to update, and it returns this error, what can I do to fix?

[root@server custombuild]# ./build roundcube
Found MySQL version 10.5
Granting access: GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,LOCK TABLES,INDEX,REFERENCES ON da_roundcube.* TO 'da_roundcube'@'localhost';
Setting password: ALTER USER 'da_roundcube'@'localhost' IDENTIFIED BY 'mypassword';
Editing roundcube configuration...
Roundcube 1.5.2 has been installed successfully.
WARNING: Changed defaults (These config options have new default values):
- 'skin'
- 'smtp_port'
- 'smtp_user'
- 'smtp_pass'
- 'jquery_ui_skin_map'
Executing database schema update.
Updating database schema (2020020101)... [FAILED]
ERROR: Error in DDL upgrade 2020020101: [1091] Can't DROP FOREIGN KEY `user_id_fk_cache`; check that it exists
 


 
Sorry but I couldn't find what exactly is the correct solution to my problem.
 
I couldn't find what exactly is the correct solution
You didn't read the links I have shard, one of the solution was by @sec-is (did not checked by my self ) was:
Code:
Yep, that works. Even though I am on an old MariaDB 5.5.41 system on CentOs 7.
What did I do?

edit (nano) /etc/my.cnf.d/server.cnf
[mariadb]
innodb_large_prefix=true
innodb_file_format=Barracuda
innodb_file_per_table = ON
(the [mariadb] section was empty on beforehand)
then
systemctl restart mysqld
Then in phpmyadmni open database da_roundcube and run SQL commands:
SET SESSION innodb_strict_mode=ON;
CREATE TABLE `collected_addresses` (
`address_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
`name` varchar(255) NOT NULL DEFAULT '',
`email` varchar(255) NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`type` int(10) UNSIGNED NOT NULL,
PRIMARY KEY(`address_id`),
CONSTRAINT `user_id_fk_collected_addresses` FOREIGN KEY (`user_id`) REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
UNIQUE INDEX `user_email_collected_addresses_index` (`user_id`, `type`, `email`)
) ENGINE=INNODB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
The table has now been created. I assume Roundcube will start using it from here on.
 
You didn't read the links I have shard, one of the solution was by @sec-is (did not checked by my self ) was:
Code:
Yep, that works. Even though I am on an old MariaDB 5.5.41 system on CentOs 7.
What did I do?

edit (nano) /etc/my.cnf.d/server.cnf
[mariadb]
innodb_large_prefix=true
innodb_file_format=Barracuda
innodb_file_per_table = ON
(the [mariadb] section was empty on beforehand)
then
systemctl restart mysqld
Then in phpmyadmni open database da_roundcube and run SQL commands:
SET SESSION innodb_strict_mode=ON;
CREATE TABLE `collected_addresses` (
`address_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
`name` varchar(255) NOT NULL DEFAULT '',
`email` varchar(255) NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`type` int(10) UNSIGNED NOT NULL,
PRIMARY KEY(`address_id`),
CONSTRAINT `user_id_fk_collected_addresses` FOREIGN KEY (`user_id`) REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
UNIQUE INDEX `user_email_collected_addresses_index` (`user_id`, `type`, `email`)
) ENGINE=INNODB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
The table has now been created. I assume Roundcube will start using it from here on.
Yes I have read the links you shared, but I think the solution you proposed is for this type of error:

ERROR: Error in DDL upgrade 2020020101: [1071] Specified key was too long; max key length is 767 bytes

or in any case it didn't work for my problem, because I tried but nothing has changed the problem persists.

My os version is AlmaLinux release 8.5, and MariaDB version is 10.5.13.
 
You didn't mentioned your OS and MariaDB version in the beginning so I had assumed you were on older OS/SQL
The solution above was for an older version and not for MariaDB 10.5
That said, the error happened most of the time with older OS.SQL version.

We never had problems with Centos 7 + Almalinux 8.5 systems with this Rouncube version so its strange that you had.
I have seen this problem with Centos 6 and Mysql 5.5, because an upgrade was not an option we have decided to keep an older version of RC instead of messing with tables , this was our choice to deal with it ..
 
Last edited:
Back
Top