Installation fails after first site creation


I am making a fresh install of Matomo. After typing my first site and hitting next (step 6 in the installer), I get an error message saying “Constructor failed”. I looked at the error log and even installed xdebug but it didn’t find any more detailed information. It is running in a chrooted php-fpm.


Can you post the exact error message?
I don’t know any PHP error called Constructor failed and Google also doesn’t show much helpful info.

Maybe double-check if the error isn’t comming from PHP itself or the webserver.


That definitly seems like a more obscure error.

Can you please set PIWIK_PRINT_ERROR_BACKTRACE in index.php to true. Then you should see a more detailed stack trace.

diff --git a/index.php b/index.php
index ebef3bda37..4307b60ed2 100644
--- a/index.php
+++ b/index.php
@@ -21,7 +21,7 @@ if (!defined('PIWIK_INCLUDE_PATH')) {
 require_once PIWIK_INCLUDE_PATH . '/core/bootstrap.php';
-    define('PIWIK_PRINT_ERROR_BACKTRACE', false);
+    define('PIWIK_PRINT_ERROR_BACKTRACE', true);
 require_once PIWIK_INCLUDE_PATH . '/core/dispatch.php';

Thank you. At least this gave something.

#0 /app/plugins/Installation/FormFirstWebsiteSetup.php(112): NumberFormatter->__construct('en_FI', 2)
#1 /app/libs/HTML/QuickForm2/Rule.php(247): Piwik\Plugins\Installation\Rule_isValidTimezone->validateOwner()
#2 /app/libs/HTML/QuickForm2/Node.php(592): HTML_QuickForm2_Rule->validate()
#3 /app/libs/HTML/QuickForm2/Container.php(379): HTML_QuickForm2_Node->validate()
#4 /app/libs/HTML/QuickForm2.php(204): HTML_QuickForm2_Container->validate()
#5 /app/plugins/Installation/Controller.php(325): HTML_QuickForm2->validate()
#6 [internal function]: Piwik\Plugins\Installation\Controller->firstWebsiteSetup()
#7 /app/core/FrontController.php(556): call_user_func_array(Array, Array)
#8 /app/core/FrontController.php(144): Piwik\FrontController->doDispatch('Installation', 'firstWebsiteSet...', Array)
#9 /app/core/dispatch.php(34): Piwik\FrontController->dispatch()
#10 /app/index.php(27): require_once('/app/core/dispa...')
#11 {main}

Edit: I figured it out. Intl extension was unable to access icu data due to being chrooted.

1 Like

I have the same problem, but your answer / solution is not very specific. Could you explain what you did?

I just found the solution on my system. I just added:


To my php.ini. (Apache 2.4.46 / PHP 7.2.31 running inside a jail on FreeBSD 11.4)