Initial setup error "website time zone is not valid" any workarounds?


#1

Hi everyone new here. On step 7 of the initial setup I always get that “website time zone is not valid” error no matter what I enter in there I can’t seem to set anything up. Any thoughts or workarounds? Thanks.


(Matthieu Aubry) #2

Try select a UTC+X timezone maybe?

This is the first time this issue is reported, maybe try to upgrade your PHP or maybe there is a bug in piwik?


#3

Yea I was surprised I couldn’t find anything out there of people running into the same issue. I tried a bunch of different UTC + #'s and a bunch of different time zones. I’m using PHP 5.2.17 now so I guess an upgrade could fix it but I feel like something else is not working properly. Thanks for the response.


(Matthieu Aubry) #4

pfives definitely there must be a bug. If you are familiar with PHP you could maybe try to debug this issue. The timezone code is plugins/Installation/FormFirstWebsiteSetup.php

The function throwing the error would be checkValidTimezone() in plugins/SitesManager/API.php


#5

thanks for the information


#6

I had the same issue but I found the cause and solution. It’s not exactly a bug.

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”.


(Matthieu Aubry) #7

Thank you for the research! I created a ticket; If mysql user does not have sufficient privileges, Piwik install fails "website time zone is not valid" · Issue #2963 · matomo-org/matomo · GitHub

please continue the discussion over there if needed. we will fix it at some point :slight_smile: