@oasesoftware opened this Issue on August 7th 2020

Hello,
I'm using the following configuration:
Matomo-Version: 3.14.0
MySQL-Version: 10.3.23-MariaDB-1:10.3.23+maria~jessie-log
PHP-Version: 7.2.31-1+0 20200514.41+debian8 1.gbpe2a56b

I'm trying to import from an apache2 Logfile which works very well for couple of files. But now I allways get stuck with this error message on the php-machine where matomo is running:

[Fri Aug 07 10:05:12.481734 2020] [:error] [pid 3570187:tid 140409309157120] [client xxx.xxx.xxx.xxx:33024] Error in Matomo (tracker): Error query: Mysqli statement execute error : Data too long for column 'name' at row 1 In query:
INSERT INTO piwik_log_action (name, hash, type, url_prefix) VALUES (?,CRC32(?),?,?)
Parameters: array (   
0 => '404/URL = http%3A%2F%2Fweatherguide.net4you.net%2Findex.php%3Foption%3Dcom_tag%26task%3Dtag%26lang%3Des%26tag%3D999999.9%27%2Bunion%2Ball%2Bselect%2B1%2Cconcat%280x3c757365723e%2Cusername%2C0x3c757365723e3c706173733e%2Cpassword%2C0x3c706173733e%29%2Bfrom%2Bjos_users%2Bwhere%2Bgid%3D24%2Blimit%2B0%2C1--%2Ba',   
1 => '404/URL = http%3A%2F%2Fweatherguide.net4you.net%2Findex.php%3Foption%3Dcom_tag%26task%3Dtag%26lang%3Des%26tag%3D999999.9%27%2Bunion%2Ball%2Bselect%2B1%2Cconcat%280x3c757365723e%2Cusername%2C0x3c757365723e3c706173733e%2Cpassword%2C0x3c706173733e%29%2Bfrom%2Bjos_users%2Bwhere%2Bgid%3D24%2Blimit%2B0%2C1--%2Ba',   
2 => 4,   
3 => NULL, )

I found out, that the value "name" in the table "piwik_log_action" is a varchar(300) field whereas the string _404/URL = http%3A%2F%2Fweatherguide.net4you.net%2Findex.php%3Foption%3Dcom_tag%26task%3Dtag%26lang%3Des%26tag%3D999999.9%27%2Bunion%2Ball%2Bselect%2B1%2Cconcat%280x3c757365723e%2Cusername%2C0x3c757365723e3c706173733e%2Cpassword%2C0x3c706173733e%29%2Bfrom%2Bjosusers%2Bwhere%2Bgid%3D24%2Blimit%2B0%2C1--%2Ba has a size of 307 chars.
I'm wondering where this string is comming from. Because if I analyze the file which sould be imported there is no such URL (nor URL encoded or URL decoded) in the logfile.
I also don't know whether it will be a problem if I change the size of the "name" filed in the table "piwik_log_action" to 310 to fit this extra long string for the name field?

Can anyone help me?
Thanks in advance.

@sgiehl commented on August 7th 2020 Member

Hi @oasesoftware
Sorry to hear you have some trouble with Matomo.
Actually I wonder where the size of 300 comes from. That column used to be a TEXT column in older versions, but meanwhile should be a VARCHAR(4096) for new installs. With the update to Matomo 4 all installs will be forced to update the column to that varchar size.

So yes, it should be save to already update the column to a bigger size.

This Issue was closed on August 7th 2020
Powered by GitHub Issue Mirror