Skip to content

Commit

Permalink
Ability to customise the piwik/tmp directory path in config/config.in…
Browse files Browse the repository at this point in the history
…i.php file (#12189)
  • Loading branch information
iMarkus authored and mattab committed Dec 15, 2017
1 parent d647d5c commit e78d5c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion config/global.ini.php
Expand Up @@ -135,7 +135,6 @@
disable_merged_assets = 0

[General]

; the following settings control whether Unique Visitors `nb_uniq_visitors` and Unique users `nb_users` will be processed for different period types.
; year and range periods are disabled by default, to ensure optimal performance for high traffic Piwik instances
; if you set it to 1 and want the Unique Visitors to be re-processed for reports in the past, drop all piwik_archive_* tables
Expand Down Expand Up @@ -573,6 +572,10 @@
; absolute path to the chroot environment. eg. '/path/to/piwik/chrooted/'
absolute_chroot_path =

; The path (relative to the Piwik directory) in which Piwik temporary files are stored.
; Defaults to ./tmp (the tmp/ folder inside the Piwik directory)
tmp_path = "/tmp"

; In some rare cases it may be useful to explicitely tell Piwik not to use LOAD DATA INFILE
; This may for example be useful when doing Mysql AWS replication
enable_load_data_infile = 1
Expand Down
7 changes: 5 additions & 2 deletions config/global.php
Expand Up @@ -4,6 +4,7 @@
use Interop\Container\Exception\NotFoundException;
use Piwik\Cache\Eager;
use Piwik\SettingsServer;
use Piwik\Config;

return array(

Expand All @@ -19,8 +20,10 @@
} else {
$instanceId = '';
}

return $root . '/tmp' . $instanceId;

$tmp = Config::getInstance()->General['tmp_path'];

return $root . $tmp . $instanceId;
},

'path.cache' => DI\string('{path.tmp}/cache/tracker/'),
Expand Down

0 comments on commit e78d5c9

Please sign in to comment.