Reported in forum:
Rather than failing with error message "timezone not valid"
Problem in code:
This issue arises from a call to Piwik_SetOption (when it's called from setDefaultTimezone) that causes an exception to be thrown because the public function "set" in Option.php fails at it's database call. This is due to insufficient database user privileges. Granting the piwik DB user more privileges allows the setup to continue.
Maybe we could have a page that checks the database user grants before continuing the setup. Or at-least some docs on the needed permissions for the piwik DB user since not everyone will be doing a "grant all".
Checking the privileges by looking at SHOW GRANTS, or mysql.user and mysql.db tables, is non-trivial.
It would probably be easier (and more database-agnostic) to explicitly test the various operations used by Piwik, e.g.,
Attachment: Patch for this issue.
I uploaded a patch for this issue. This is the first time I've looked at the installation code, so I believe it would be good to review them.
Notes on the patch:
Let me know what you think.
Thanks vipsoft for the suggestion, and Kuddos capedfuzz for this clean patch!
(In ) Fixes #2963, added installation check for needed DB user privileges.
Regarding my commit: I tested w/ every privilege, every needed privilege, w/ every needed privilege except one (for each privilege), and w/ no privileges. Also tested to make sure other fields were checked properly. Everything worked.