Update to 3.12 breaks Matomo installation

After the update the installation is broken with the following error:

**Warning** : file_exists(): open_basedir restriction in effect. File(/var/www/virtservers/web_31/../matomo_bootstrap.php) is not within the allowed path(s): (/var/www/virtservers/web_31:/tmp) in **/var/www/virtservers/web_31/index.php** on line **16**

Everything worked fine with 3.11

Thanks for reporting, I created a Github issue for this:

You should be able to fix this in the meantime by reverting this patch (so remove the lines added in the console, index.php and piwik.php files):

diff --git a/console b/console
index 47b8ba59f9..75a37bef5c 100755
--- a/console
+++ b/console
@@ -6,6 +6,8 @@ if (!defined('PIWIK_DOCUMENT_ROOT')) {
 
 if (file_exists(PIWIK_DOCUMENT_ROOT . '/bootstrap.php')) {
     require_once PIWIK_DOCUMENT_ROOT . '/bootstrap.php';
+} elseif (file_exists(PIWIK_DOCUMENT_ROOT . '/../matomo_bootstrap.php')) {
+    require_once PIWIK_DOCUMENT_ROOT . '/../matomo_bootstrap.php';
 }
 
 if (!defined('PIWIK_INCLUDE_PATH')) {
diff --git a/index.php b/index.php
index 8e3b2cb64a..184a785f81 100644
--- a/index.php
+++ b/index.php
@@ -13,6 +13,8 @@
 }
 if (file_exists(PIWIK_DOCUMENT_ROOT . '/bootstrap.php')) {
     require_once PIWIK_DOCUMENT_ROOT . '/bootstrap.php';
+} elseif (file_exists(PIWIK_DOCUMENT_ROOT . '/../matomo_bootstrap.php')) {
+    require_once PIWIK_DOCUMENT_ROOT . '/../matomo_bootstrap.php';
 }
 if (!defined('PIWIK_INCLUDE_PATH')) {
     define('PIWIK_INCLUDE_PATH', PIWIK_DOCUMENT_ROOT);
diff --git a/piwik.php b/piwik.php
index 90c4412fb1..7fad7805b6 100644
--- a/piwik.php
+++ b/piwik.php
@@ -24,6 +24,8 @@
 }
 if (file_exists(PIWIK_DOCUMENT_ROOT . '/bootstrap.php')) {
     require_once PIWIK_DOCUMENT_ROOT . '/bootstrap.php';
+} elseif (file_exists(PIWIK_DOCUMENT_ROOT . '/../matomo_bootstrap.php')) {
+    require_once PIWIK_DOCUMENT_ROOT . '/../matomo_bootstrap.php';
 }
 if (!defined('PIWIK_INCLUDE_PATH')) {
     define('PIWIK_INCLUDE_PATH', PIWIK_DOCUMENT_ROOT);

Thank you. Removing these lines worked!

1 Like