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

Mysql warning atfer update to Piwik 2.17.0 #10796

Closed
roman-syrota opened this issue Oct 27, 2016 · 5 comments
Closed

Mysql warning atfer update to Piwik 2.17.0 #10796

roman-syrota opened this issue Oct 27, 2016 · 5 comments
Assignees
Labels
answered For when a question was asked and we referred to forum or answered it.
Milestone

Comments

@roman-syrota
Copy link

Hello atfer update to 2.17.0 version i'v got not working piwik.php.
"GET /piwik.php?action_name=....... HTTP/2.0" 400 - as you can see HTTP 400 status code.

I made an investigation and found the following records in php error log:

2016/10/27 15:48:06 [error] 34202#0: *199 FastCGI sent in stderr: "PHP message: Error in Piwik (tracker): Error query: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'location_latitude' at row 1 In query: INSERT INTO piwik_log_visit (idvisitor, config_id, location_ip, idsite, visit_first_action_time, visit_goal_buyer, visit_goal_converted, visit_last_action_time, visitor_days_since_first, visitor_days_since_order, visitor_returning, visitor_count_visits, visit_entry_idaction_name, visit_entry_idaction_url, visit_exit_idaction_name, visit_exit_idaction_url, visit_total_actions, visit_total_searches, referer_name, referer_type, referer_url, location_browser_lang, config_browser_engine, config_browser_name, config_browser_version, config_device_brand, config_device_model, config_device_type, config_os, config_os_version, visit_total_events, visitor_localtime, visitor_days_since_last, config_resolution, config_cookie, config_director, config_flash, config_gears, config_java, config_pdf, config_quicktime, config_realplayer, config_silverlight, config_windowsmedia, a" while reading response header from upstream

Is it any way to fix this?

@tsteur
Copy link
Member

tsteur commented Oct 30, 2016

Can you execute the following query and post the result maybe?

SHOW FIELDS FROM piwik_log_visit where field = 'location_latitude'

@roman-syrota
Copy link
Author

Hello,
sorry for delay.
Here is:
SHOW FIELDS FROM piwik_log_visit where field = 'location_latitude';
+-------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+-------------+------+-----+---------+-------+
| location_latitude | float(10,6) | YES | | NULL | |
+-------------------+-------------+------+-----+---------+-------+

@tsteur
Copy link
Member

tsteur commented Nov 3, 2016

That looks good. Does it happen all the time?

Do you know which Geolocation provider you are using? You can check in "Administration => Geolocation".

We could try to set a different column type but this wouldn't fix the actual issue and you would maybe start tracking wrong data.

Are you familiar with PHP? Before line https://github.com/piwik/piwik/blob/2.17.0/core/Tracker/Model.php#L276 could you try to add the following line:

error_log(var_export($visit, 1));

and check your server logs afterwards? Feel free to replace some values that you do not want to share with *****

@roman-syrota
Copy link
Author

Hi,
i'm using GeoIP (Php) as Geolocation provider.
i have added 2 lines in Model.php
error_log(var_export($visit, 1));
error_log(var_export($visit['location_latitude'], 1));
Here is output:
2016/11/04 13:26:54 [error] 84609#0: *86079 FastCGI sent in stderr: "PHP message: array (
'idvisitor' => '.��"�6ʒ',
'config_id' => '%_���ō�',
'location_ip' => '[�' . "\0" . '' . "\0" . '',
'idsite' => 2,
'visit_first_action_time' => '2016-11-04 12:26:54',
'visit_goal_buyer' => 0,
'visit_goal_converted' => 0,
'visit_last_action_time' => '2016-11-04 12:26:54',
'visitor_days_since_first' => '78',
'visitor_days_since_order' => 0,
'visitor_returning' => 1,
'visitor_count_visits' => 6,
'visit_entry_idaction_name' => 2062,
'visit_entry_idaction_url' => 14,
'visit_exit_idaction_name' => 2062,
'visit_exit_idaction_url' => 14,
'visit_total_actions' => 1,
'visit_total_searches' => 0,
'referer_keyword' => NULL,
'referer_name' => NULL,
'referer_type' => 1,
'referer_url' => '',
'location_browser_lang' => 'ru-ru',
'config_browser_engine' => 'Blink',
'config_browser_name' => 'CH',
'config_browser_version' => '51.0',
'config_device_brand' => '',
'config_device_model' => '',
'config_device_type' => 0,
'config_os' => 'LIN',
'con...

PHP message: 'This parameter is unavailable in selected .BIN data file. Please upgrade data file.'

So as i can see i have to upgrade data file, could you tell which file and how to upgrade it.

Thank you.

@tsteur
Copy link
Member

tsteur commented Nov 7, 2016

I have just googled for that message and turns out it is related to http://plugins.piwik.org/Ip2location . So the bug you experience may be actually related to that plugin. A database seems to be available at http://lite.ip2location.com/ and a commercial one at http://www.ip2location.com/

I haven't used the plugin so I cannot really tell. I will close the issue as the bug is related to ip2location and the reason the location field is too long is because of the error message. If you cannot find where to update it, maybe ask the developer here: https://github.com/ip2location/ip2location-piwik/issues

@tsteur tsteur closed this as completed Nov 7, 2016
@roman-syrota roman-syrota added the answered For when a question was asked and we referred to forum or answered it. label Nov 7, 2016
@roman-syrota roman-syrota added this to the 2.17.1 milestone Nov 7, 2016
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