I am using the latest version of Piwik 0.5.5 and get the following errors when I have the ‘week’ time span selected on the reports:
SQLSTATE[42000]: Syntax error or access violation: 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),…) with no GROUP columns is illegal if there is no GROUP BY clause
Also, I see that visits are getting recorded in the database, but there the summaries are showing no visitors.
[quote=vipsoft @ Mar 24 2010, 01:37 PM]There is a bug in some versions of mysql community edition, generating false group-by errors when sqlmode is full-group-by.
Set sql_mode to ‘’ in my.cnf and see if that changes things.[/quote]
Unfortunately, I do not have access to the database server to make such a change. Any other ideas?
We won’t support this in the core, but you’re welcome to hack your copy of core/Piwik.php’s createDatabaseObject(), and send “SET sql_mode=’’;” each time a connection is established, e.g., (around line 1700)
$db = Piwik_Db::factory($adapter, $dbInfos);
$db->getConnection();
Zend_Db_Table::setDefaultAdapter($db);
$db->resetConfig(); // we don't want this information to appear in the logs
}
Zend_Registry::set('db', $db);
Piwik_Exec("SET sql_mode='';"); // <-- add this line; MySQL-specific
}
We won’t support this in the core, but you’re welcome to hack your copy of core/Piwik.php’s createDatabaseObject(), and send “SET sql_mode=’’;” each time a connection is established, e.g., (around line 1700)
$db = Piwik_Db::factory($adapter, $dbInfos);
$db->getConnection();
Zend_Db_Table::setDefaultAdapter($db);
$db->resetConfig(); // we don't want this information to appear in the logs
}
Zend_Registry::set('db', $db);
Piwik_Exec("SET sql_mode='';"); // <-- add this line; MySQL-specific
}
[/quote]
That seems to make the SQL errors go away, but I cannot see any data showing up in the reports, even though I can see in the piwik_log_visit table that there is data.
If the PHP timezone isn’t set, it’ll default to America/New_York. This will cause lag in reports since 0.5.5 still uses the MySQL server time for some queries.
We plan to address this in 0.6. In the meantime, you have to set your PHP timezone.