Foren / Cotonti / Support / SQL error 22001: String data, right truncated

pieter
#1 1. Mai 2019, 07:12

Does anybody has an idea how to solve this?

SQL error 22001: String data, right truncated: 1406 Data too long for column 'online_ip' at row 1

#0  cot_diefatal(SQL error 22001: String data, right truncated: 1406 Data too long for column 'online_ip' at row 1) called at [/customers/6/4/a/xxxxxxxx/httpd.www/system/database.php:451]
#1  CotDB->insert(cot_online, Array ([online_ip] => 2a02:1810:1d33:9700:ddca:e0f4:feb9:b41,[online_name] => v,[online_lastseen] => 1556694430,[online_location] => home,[online_subloc] => ,[online_userid] => -1,[online_shield] => 0,[online_hammer] => 0)) called at [/customers/6/4/a/xxxxxx/httpd.www/plugins/whosonline/whosonline.header.main.php:62]
#2  include(/customers/6/4/a/xxxxx/httpd.www/plugins/whosonline/whosonline.header.main.php) called at [/customers/6/4/a/xxxxxx/httpd.www/system/header.php:87]
#3  require_once(/customers/6/4/a/xxxxx/httpd.www/system/header.php) called at [/customers/6/4/a/xxxxx/httpd.www/modules/index/index.php:44]
#4  require_once(/customers/6/4/a/xxxxxx/httpd.www/modules/index/index.php) called at [/customers/6/4/a/xxxxxx/httpd.www/index.php:176]
... can we help you ...
foxhound
#2 15. Mai 2019, 19:37
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
aiwass
#3 3. November 2019, 19:26

Workaround:
Fast workaround try to extend online_ip field in cot_online table to 45 char length as follows

ALTER TABLE `cot_online` CHANGE `online_ip` `online_ip` VARCHAR(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '';
Take all that money that we spend on weapons and defences each year and instead spend it feeding and clothing and educating the poor of the world, which it would many times over, not one human being excluded, and we could explore space, together, both inner and outer, forever, in peace. - Bill Hicks

https://evlear.com