Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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(?),?,?) #16272

Closed
oasesoftware opened this issue Aug 7, 2020 · 1 comment
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@oasesoftware
Copy link

oasesoftware commented Aug 7, 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%2Bjos_users%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
Copy link
Member

sgiehl commented Aug 7, 2020

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.

@sgiehl sgiehl closed this as completed Aug 7, 2020
@sgiehl sgiehl added the answered For when a question was asked and we referred to forum or answered it. label Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants