Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5706

Piwiki Load-Balanced - which folders to be shared/Question about bootstrap.php

$
0
0

@ub_piwik wrote:

Hello,

up to now, we are using Piwiki 2.16.1 in a load-balanced environment, i.e., two servers use a shared Piwik installation residing on an NFS share -- which is quite slow.
We have database session storage but we'd like to install Piwiks files in local storage and place only the minimum number of files and folders (imho the config and tmp folder) on the NFS share.
My first thought was to use a bootstrap.php (according to the documentation at http://piwik.org/docs/include-piwik-in-your-project/) with the following content:

<?php
define('PIWIK_USER_PATH', '/shared-nfs/piwik/piwik-user');

In the folder /shared-nfs/piwik/piwik-user config and tmp folder are present.
However, during installation Piwik complains that it cannot find a number of files that are typically located in Piwik's web root (e.g. twig files), indicating that Piwik's install routine does not separate its document root path from the piwik user data path and following the php instructions in index.php:

if (!defined('PIWIK_INCLUDE_PATH')) {
    define('PIWIK_INCLUDE_PATH', PIWIK_DOCUMENT_ROOT);
}

Changing the bootstrap.php's content to the following did not help either:

<?php
define('PIWIK_DOCUMENT_ROOT', '/opt/piwik/current');
define('PIWIK_USER_PATH', '/shared-nfs/piwik/piwik-user');

Any help in getting seperating Piwik's document root from the shared config and tmp folder is really appreciated.

Kind regards,

Maik

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles