matomo-org / plugin-EnvironmentVariables

Allows you to specify Matomo config in environment variables instead of the config file.
12 stars 14 forks source link

Does not work with nginx+php-fpm(?) #1

Closed toredash closed 5 years ago

toredash commented 5 years ago

Hi,

Having an issue to get this to work with nginx+php-fpm.

The plugin is loaded:

# ./console plugin:list | grep -i env
| EnvironmentVariables | Optional          | Activated     |

Environment variables are present:

env | grep MATOMO_DATABASE
MATOMO_DATABASE_HOST=XXXX
MATOMO_DATABASE_DBNAME=matomo
MATOMO_DATABASE_USERNAME=XXXX
MATOMO_DATABASE_PASSWORD=XXXXX

My config.php:

# grep database -A 5 /var/www/config/config.ini.php 
[database]
tables_prefix = "matomo_"

[General]

The error I get is SQLSTATE[HY000] [2002] No such file or directory, indicating it is trying to connect via sockets?

If I add "host = XXX" to the database section of config.ini.php it works fine.

I've verified that the ENV variables are present for the nginx user, which is the user used by both nginx and php-fpm.

Not really sure what I am doing wrong it, any pointers ?

Meta-information: Matomo 3.8.1 Runtime: Docker with ENV set on the container level

I've got a bootstrap script that modifies the config.php file with ENV variables previously, but I was aiming to remove this and just use this plugin instead.

tsteur commented 5 years ago

Can you edit plugins/EnvironmentVariables/config/config.php and see if it finds any configuration values here by adding a var_dump();exit; or something? Not sure if you are familiar with PHP. Could look like this: image

toredash commented 5 years ago

Sure can!

string(108) "database_MATOMO_DATABASE_HOST_XXXX"
string(40) "database_MATOMO_DATABASE_USERNAME_master"
string(50) "database_MATOMO_DATABASE_PASSWORD_XXXX"
string(38) "database_MATOMO_DATABASE_DBNAME_matomo"
string(32) "Cache_MATOMO_CACHE_BACKEND_redis"
string(90) "RedisCache_MATOMO_REDISCACHE_HOST_XXXX"
string(39) "RedisCache_MATOMO_REDISCACHE_DATABASE_0"
string(40) "Debug_MATOMO_DEBUG_ENABLE_SQL_PROFILER_0"
string(42) "General_MATOMO_GENERAL_MAINTENANCE_MODE_0 "
string(34) "General_MATOMO_GENERAL_FORCE_SSL_1"
string(59) "General_MATOMO_GENERAL_LIVE_WIDGET_REFRESH_AFTER_SECONDS_10"
string(64) "General_MATOMO_GENERAL_LIVE_WIDGET_VISITOR_COUNT_LAST_MINUTES_15"
string(47) "General_MATOMO_GENERAL_ASSUME_SECURE_PROTOCOL_1"
string(41) "General_MATOMO_GENERAL_ENABLE_INSTALLER_0"
string(63) "General_MATOMO_GENERAL_SALT_XXXXXX"
string(64) "General_MATOMO_GENERAL_LIVE_WIDGET_VISITOR_COUNT_LAST_MINUTES_15"
string(60) "General_MATOMO_GENERAL_INSTANCE_ID_XXXXX"
string(50) "QueuedTracking_MATOMO_QUEUEDTRACKING_BACKEND_redis"
string(103) "QueuedTracking_MATOMO_QUEUEDTRACKING_REDISHOST_XXXX"
string(52) "QueuedTracking_MATOMO_QUEUEDTRACKING_REDISDATABASE_2"
string(54) "QueuedTracking_MATOMO_QUEUEDTRACKING_QUEUEENABLED_true"
string(54) "QueuedTracking_MATOMO_QUEUEDTRACKING_NUMQUEUEWORKERS_8"
string(60) "QueuedTracking_MATOMO_QUEUEDTRACKING_NUMREQUESTSTOPROCESS_15"
string(61) "QueuedTracking_MATOMO_QUEUEDTRACKING_USESENTINELBACKEND_false"
toredash commented 5 years ago

Seems like there is an logical error when setting the new values.

When dumping vars after $general[$category] = $envValue; like so;

var dump($category);
var dump($general);
var dump($envValue);

This is the output.

string(8) "database"
array(18) {
  ["host"]=>
  string(0) ""
  ["username"]=>
  string(14) "%%MYSQL_USER%%"
  ["password"]=>
  string(18) "%%MYSQL_PASSWORD%%"
  ["dbname"]=>
  string(16) "%%MYSQL_DBNAME%%"
  ["tables_prefix"]=>
  string(7) "matomo_"
  ["port"]=>
  int(3306)
  ["adapter"]=>
  string(9) "PDO\MYSQL"
  ["type"]=>
  string(6) "InnoDB"
  ["schema"]=>
  string(5) "Mysql"
  ["enable_ssl"]=>
  int(0)
  ["ssl_ca"]=>
  string(0) ""
  ["ssl_cert"]=>
  string(0) ""
  ["ssl_key"]=>
  string(0) ""
  ["ssl_ca_path"]=>
  string(0) ""
  ["ssl_cipher"]=>
  string(0) ""
  ["ssl_no_verify"]=>
  string(0) ""
  ["charset"]=>
  string(4) "utf8"
  ["database"]=>
  string(78) "XXXXX"
}
string(78) "XXXXX"

Notice that the arrays "host" value is empty, but the array has a "database" item which has the value that "host" should have.

toredash commented 5 years ago

I'm really puzzled by the whole thing.

# env | grep -i MATOMO_
MATOMO_HOSTNAME=X
MATOMO_DEBUG_ENABLE_SQL_PROFILER=0
MATOMO_QUEUEDTRACKING_REDISDATABASE=2
MATOMO_QUEUEDTRACKING_NUMQUEUEWORKERS=8
MATOMO_GENERAL_ENABLE_INSTALLER=0
MATOMO_LOG_LEVEL=INFO
MATOMO_GENERAL_INSTANCE_ID=X
MATOMO_DATABASE_HOST=X
MATOMO_GENERAL_FORCE_SSL=1
MATOMO_SALT=X
MATOMO_TRACKER_HOSTNAME=X
MATOMO_REDISCACHE_DATABASE=0
MATOMO_ENABLE_INSTALLER=0
MATOMO_GENERAL_ASSUME_SECURE_PROTOCOL=1
MATOMO_QUEUEDTRACKING_NUMREQUESTSTOPROCESS=15
MATOMO_DATABASE_DBNAME=matomo
MATOMO_GENERAL_LIVE_WIDGET_REFRESH_AFTER_SECONDS=10
MATOMO_QUEUEDTRACKING_QUEUEENABLED=true
MATOMO_QUEUEDTRACKING_USESENTINELBACKEND=false
MATOMO_REDISCACHE_HOST=Xamazonaws.com
MATOMO_DATABASE_USERNAME=master
MATOMO_QUEUEDTRACKING_REDISHOST=Xamazonaws.com
MATOMO_GENERAL_LIVE_WIDGET_VISITOR_COUNT_LAST_MINUTES=15
MATOMO_QUEUEDTRACKING_BACKEND=redis
MATOMO_DATABASE_PASSWORD=X
MATOMO_VERSION=3.8.1
MATOMO_GENERAL_LOG_LEVEL=INFO
MATOMO_CACHE_BACKEND=redis
MATOMO_GENERAL_SALT=X
MATOMO_GENERAL_MAINTENANCE_MODE=0 

(I know there are duplicates, thats variables for my docker-entrypoint script)

If I call php directly via php7 index.php, it works.

If I do curl localhost:8000, it does not works and file log shows this error:

WARNING Piwik\ErrorHandler[2019-03-21 12:52:38 UTC] [c48f1] /var/www/vendor/piwik/cache/src/Backend/Factory.php(60): Warning - Redis::connect(): php_network_getaddresses: getaddrinfo failed: Name does not resolve - Matomo 3.8.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] /var/www/libs/Zend/Db/Adapter/Pdo/Abstract.php(144): SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name does not resolve
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #0 /var/www/libs/Zend/Db/Adapter/Pdo/Mysql.php(109): Zend_Db_Adapter_Pdo_Abstract->_connect()
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #1 /var/www/core/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Mysql->_connect()
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #2 /var/www/core/Db/Adapter/Pdo/Mysql.php(74): Piwik\Db\Adapter\Pdo\Mysql->_connect()
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #3 /var/www/core/Db/Adapter.php(51): Piwik\Db\Adapter\Pdo\Mysql->getConnection()
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #4 /var/www/core/Db.php(122): Piwik\Db\Adapter::factory('PDO\\MYSQL', Array)
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #5 /var/www/core/Db.php(54): Piwik\Db::createDatabaseObject()
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #6 /var/www/core/Db.php(725): Piwik\Db::get()
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #7 /var/www/core/Db.php(221): Piwik\Db::logExtraInfoIfDeadlock(Object(Zend_Db_Adapter_Exception))
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #8 /var/www/core/Option.php(271): Piwik\Db::fetchAll('SELECT option_v...')
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #9 /var/www/core/Option.php(173): Piwik\Option->autoload()
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #10 /var/www/core/Option.php(46): Piwik\Option->getValue('branding_use_cu...')
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #11 /var/www/plugins/CoreAdminHome/CustomLogo.php(51): Piwik\Option::get('branding_use_cu...')
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #12 /var/www/plugins/CoreAdminHome/CustomLogo.php(66): Piwik\Plugins\CoreAdminHome\CustomLogo->isEnabled()
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #13 /var/www/core/ExceptionHandler.php(107): Piwik\Plugins\CoreAdminHome\CustomLogo->hasSVGLogo()
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #14 /var/www/core/ExceptionHandler.php(71): Piwik\ExceptionHandler::getErrorResponse(Object(RedisException))
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #15 /var/www/core/ExceptionHandler.php(36): Piwik\ExceptionHandler::dieWithHtmlErrorPage(Object(RedisException))
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #16 [internal function]: Piwik\ExceptionHandler::handleException(Object(RedisException))
DEBUG Piwik\ExceptionHandler[2019-03-21 12:52:39 UTC] [c48f1] #17 {main}

I added a var_dump($options); to /var/www/vendor/piwik/cache/src/Backend/Factory.php(59), and that output shows up as:

array(6) {
  ["host"]=>
  string(14) "%%empty%%"
  ["port"]=>
  int(6379)
  ["unix_socket"]=>
  string(0) ""
  ["timeout"]=>
  float(0)
  ["password"]=>
  string(0) ""
  ["database"]=>
  int(0)
}

I find that strange, since "%%empty%%" is present in config.ini.php, but should have been overwritten by ENV vars as indicated above.

# grep "%%empty%%" /var/www/config/config.ini.php -B 5

[QueuedTracking]
notify_queue_threshold_single_queue = 250000
backend = "redis"
redisHost = "%%empty%%"
--
backends[] = "array"
backends[] = redis

[RedisCache]
; Redis server configuration.
host = "%%empty%%"

I even tried to hard-code in the redis-FQDN in Factory.php, and that worked fine. So name-resolution does it, its just that I can't seem to get the plugin to work with me at all.

phpinfo(); returns this (ENV Variables retracted entirely):

Interactive shell

php > phpinfo()
PHP Version => 7.2.14

System => Linux deeb2d84cc7b 4.14.101-75.76.amzn1.x86_64 #1 SMP Tue Feb 19 18:14:51 UTC 2019 x86_64
Build Date => Jan 12 2019 20:59:08
Configure Command =>  './configure'  '--build=x86_64-alpine-linux-musl' '--host=x86_64-alpine-linux-musl' '--prefix=/usr' '--program-suffix=7' '--libdir=/usr/lib/php7' '--datadir=/usr/share/php7' '--sysconfdir=/etc/php7' '--localstatedir=/var' '--with-layout=GNU' '--with-pic' '--with-pear=/usr/share/php7' '--with-config-file-path=/etc/php7' '--with-config-file-scan-dir=/etc/php7/conf.d' '--disable-short-tags' '--enable-bcmath=shared' '--with-bz2=shared' '--enable-calendar=shared' '--enable-ctype=shared' '--with-curl=shared' '--enable-dba=shared' '--with-db4' '--with-dbmaker=shared' '--with-gdbm' '--enable-dom=shared' '--with-enchant=shared' '--enable-exif=shared' '--enable-fileinfo=shared' '--enable-ftp=shared' '--with-gd=shared' '--with-freetype-dir=/usr' '--disable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-webp-dir=/usr' '--with-xpm-dir=/usr' '--with-gettext=shared' '--with-gmp=shared' '--with-iconv=shared' '--with-imap=shared' '--with-imap-ssl' '--with-icu-dir=/usr' '--enable-intl=shared' '--enable-json=shared' '--with-kerberos' '--with-ldap=shared' '--with-ldap-sasl' '--with-libedit' '--enable-libxml' '--with-libxml-dir=/usr' '--enable-mbstring=shared' '--with-mysqli=shared,mysqlnd' '--with-mysql-sock=/run/mysqld/mysqld.sock' '--enable-mysqlnd=shared' '--enable-opcache=shared' '--with-openssl=shared' '--with-system-ciphers' '--enable-pcntl=shared' '--with-pcre-regex=/usr' '--enable-pdo=shared' '--with-pdo-dblib=shared' '--with-pdo-mysql=shared,mysqlnd' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' '--with-pdo-sqlite=shared,/usr' '--with-pgsql=shared' '--enable-phar=shared' '--enable-posix=shared' '--with-pspell=shared' '--without-readline' '--with-recode=shared' '--enable-session=shared' '--enable-shmop=shared' '--enable-simplexml=shared' '--with-snmp=shared' '--enable-soap=shared' '--with-sodium=shared' '--enable-sockets=shared' '--with-sqlite3=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--with-tidy=shared' '--enable-tokenizer=shared' '--with-unixODBC=shared,/usr' '--enable-wddx=shared' '--enable-xml=shared' '--enable-xmlreader=shared' '--with-xmlrpc=shared' '--enable-xmlwriter=shared' '--with-xsl=shared' '--enable-zip=shared' '--with-libzip=/usr' '--with-zlib' '--with-zlib-dir=/usr' '--disable-phpdbg' '--enable-fpm' '--enable-embed' '--with-litespeed' 'build_alias=x86_64-alpine-linux-musl' 'host_alias=x86_64-alpine-linux-musl'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php7
Loaded Configuration File => /etc/php7/php.ini
Scan this dir for additional .ini files => /etc/php7/conf.d
Additional .ini files parsed => /etc/php7/conf.d/00_ctype.ini,
/etc/php7/conf.d/00_curl.ini,
/etc/php7/conf.d/00_dom.ini,
/etc/php7/conf.d/00_gd.ini,
/etc/php7/conf.d/00_iconv.ini,
/etc/php7/conf.d/00_json.ini,
/etc/php7/conf.d/00_ldap.ini,
/etc/php7/conf.d/00_mbstring.ini,
/etc/php7/conf.d/00_opcache.ini,
/etc/php7/conf.d/00_openssl.ini,
/etc/php7/conf.d/00_pdo.ini,
/etc/php7/conf.d/00_session.ini,
/etc/php7/conf.d/00_simplexml.ini,
/etc/php7/conf.d/00_xml.ini,
/etc/php7/conf.d/01_mysqlnd.ini,
/etc/php7/conf.d/02_pdo_mysql.ini,
/etc/php7/conf.d/10_igbinary.ini,
/etc/php7/conf.d/20_redis.ini,
/etc/php7/conf.d/opcache.ini

PHP API => 20170718
PHP Extension => 20170718
Zend Extension => 320170718
Zend Extension Build => API320170718,NTS
PHP Extension Build => API20170718,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled

Registered PHP Streams => compress.zlib, https, ftps, php, file, glob, data, http, ftp
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters => zlib.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk

This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.14, Copyright (c) 1999-2018, by Zend Technologies

 _______________________________________________________________________

Configuration

Core

PHP Version => 7.2.14

Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => UTF-8 => UTF-8
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => Off => Off
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
expose_php => On => On
extension_dir => /usr/lib/php7/modules => /usr/lib/php7/modules
file_uploads => On => On
hard_timeout => 2 => 2
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/share/php7 => .:/usr/share/php7
input_encoding => no value => no value
internal_encoding => no value => no value
log_errors => On => On
log_errors_max_len => 1024 => 1024
mail.add_x_header => Off => Off
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 512M => 512M
open_basedir => no value => no value
output_buffering => 0 => 0
output_encoding => no value => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 4096K => 4096K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i  => /usr/sbin/sendmail -t -i 
serialize_precision => -1 => -1
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sys_temp_dir => no value => no value
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.assertions => -1 => -1
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.multibyte => Off => Off
zend.script_encoding => no value => no value
zend.signal_check => Off => Off

ctype

ctype functions => enabled

curl

cURL support => enabled
cURL Information => 7.64.0
Age => 4
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => No
IDN => No
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
NTLMWB => Yes
SPNEGO => No
SSL => Yes
SSPI => No
TLS-SRP => Yes
HTTP2 => Yes
GSSAPI => No
KERBEROS5 => No
UNIX_SOCKETS => Yes
PSL => No
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host => x86_64-alpine-linux-musl
SSL Version => OpenSSL/1.1.1a
ZLib Version => 1.2.11
libSSH Version => libssh2/1.8.0

date

date/time support => enabled
timelib version => 2017.09
"Olson" Timezone Database Version => 2018.7
Timezone Database => internal
Default timezone => UTC

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => no value => no value

dom

DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.9.8
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled

filter

Input Validation and Filtering => enabled
Revision => $Id: 5a34caaa246b9df197f4b43af8ac66a07464fe4b $

Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value

gd

GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.9.1
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 8
PNG Support => enabled
libPNG Version => 1.6.35
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled
WebP Support => enabled

Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 1 => 1

hash

hash support => enabled
Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512/224 sha512/256 sha512 sha3-224 sha3-256 sha3-384 sha3-512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b fnv132 fnv1a32 fnv164 fnv1a64 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 

iconv

iconv support => enabled
iconv implementation => unknown
iconv library version => unknown

Directive => Local Value => Master Value
iconv.input_encoding => no value => no value
iconv.internal_encoding => no value => no value
iconv.output_encoding => no value => no value

igbinary

igbinary support => enabled
igbinary version => 2.0.8
igbinary APC serializer ABI => no
igbinary session support => no

Directive => Local Value => Master Value
igbinary.compact_strings => On => On

json

json support => enabled
json version => 1.6.0

ldap

LDAP Support => enabled
RCS Version => $Id: 3839f871a91c293a52322c63329c68db23a0290a $
Total Links => 0/unlimited
API Version => 3001
Vendor Name => OpenLDAP
Vendor Version => 20447
SASL Support => Enabled

Directive => Local Value => Master Value
ldap.max_links => Unlimited => Unlimited

libxml

libXML support => active
libXML Compiled Version => 2.9.8
libXML Loaded Version => 20909
libXML streams => enabled

mbstring

Multibyte Support => enabled
Multibyte string engine => libmbfl
HTTP input encoding translation => disabled
libmbfl version => 1.3.2
oniguruma version => 6.3.0

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Multibyte (japanese) regex support => enabled
Multibyte regex (oniguruma) backtrack check => On
Multibyte regex (oniguruma) version => 6.3.0

Directive => Local Value => Master Value
mbstring.detect_order => no value => no value
mbstring.encoding_translation => Off => Off
mbstring.func_overload => 0 => 0
mbstring.http_input => no value => no value
mbstring.http_output => no value => no value
mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
mbstring.internal_encoding => no value => no value
mbstring.language => neutral => neutral
mbstring.strict_detection => Off => Off
mbstring.substitute_character => no value => no value

mysqlnd

mysqlnd => enabled
Version => mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
Compression => supported
core SSL => supported
extended SSL => supported
Command buffer size => 4096
Read buffer size => 32768
Read timeout => 86400
Collecting statistics => Yes
Collecting memory statistics => No
Tracing => n/a
Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_sha256_password
API Extensions => pdo_mysql

mysqlnd statistics =>  
bytes_sent => 0
bytes_received => 0
packets_sent => 0
packets_received => 0
protocol_overhead_in => 0
protocol_overhead_out => 0
bytes_received_ok_packet => 0
bytes_received_eof_packet => 0
bytes_received_rset_header_packet => 0
bytes_received_rset_field_meta_packet => 0
bytes_received_rset_row_packet => 0
bytes_received_prepare_response_packet => 0
bytes_received_change_user_packet => 0
packets_sent_command => 0
packets_received_ok => 0
packets_received_eof => 0
packets_received_rset_header => 0
packets_received_rset_field_meta => 0
packets_received_rset_row => 0
packets_received_prepare_response => 0
packets_received_change_user => 0
result_set_queries => 0
non_result_set_queries => 0
no_index_used => 0
bad_index_used => 0
slow_queries => 0
buffered_sets => 0
unbuffered_sets => 0
ps_buffered_sets => 0
ps_unbuffered_sets => 0
flushed_normal_sets => 0
flushed_ps_sets => 0
ps_prepared_never_executed => 0
ps_prepared_once_executed => 0
rows_fetched_from_server_normal => 0
rows_fetched_from_server_ps => 0
rows_buffered_from_client_normal => 0
rows_buffered_from_client_ps => 0
rows_fetched_from_client_normal_buffered => 0
rows_fetched_from_client_normal_unbuffered => 0
rows_fetched_from_client_ps_buffered => 0
rows_fetched_from_client_ps_unbuffered => 0
rows_fetched_from_client_ps_cursor => 0
rows_affected_normal => 0
rows_affected_ps => 0
rows_skipped_normal => 0
rows_skipped_ps => 0
copy_on_write_saved => 0
copy_on_write_performed => 0
command_buffer_too_small => 0
connect_success => 0
connect_failure => 0
connection_reused => 0
reconnect => 0
pconnect_success => 0
active_connections => 0
active_persistent_connections => 0
explicit_close => 0
implicit_close => 0
disconnect_close => 0
in_middle_of_command_close => 0
explicit_free_result => 0
implicit_free_result => 0
explicit_stmt_close => 0
implicit_stmt_close => 0
mem_emalloc_count => 0
mem_emalloc_amount => 0
mem_ecalloc_count => 0
mem_ecalloc_amount => 0
mem_erealloc_count => 0
mem_erealloc_amount => 0
mem_efree_count => 0
mem_efree_amount => 0
mem_malloc_count => 0
mem_malloc_amount => 0
mem_calloc_count => 0
mem_calloc_amount => 0
mem_realloc_count => 0
mem_realloc_amount => 0
mem_free_count => 0
mem_free_amount => 0
mem_estrndup_count => 0
mem_strndup_count => 0
mem_estrdup_count => 0
mem_strdup_count => 0
mem_edupl_count => 0
mem_dupl_count => 0
proto_text_fetched_null => 0
proto_text_fetched_bit => 0
proto_text_fetched_tinyint => 0
proto_text_fetched_short => 0
proto_text_fetched_int24 => 0
proto_text_fetched_int => 0
proto_text_fetched_bigint => 0
proto_text_fetched_decimal => 0
proto_text_fetched_float => 0
proto_text_fetched_double => 0
proto_text_fetched_date => 0
proto_text_fetched_year => 0
proto_text_fetched_time => 0
proto_text_fetched_datetime => 0
proto_text_fetched_timestamp => 0
proto_text_fetched_string => 0
proto_text_fetched_blob => 0
proto_text_fetched_enum => 0
proto_text_fetched_set => 0
proto_text_fetched_geometry => 0
proto_text_fetched_other => 0
proto_binary_fetched_null => 0
proto_binary_fetched_bit => 0
proto_binary_fetched_tinyint => 0
proto_binary_fetched_short => 0
proto_binary_fetched_int24 => 0
proto_binary_fetched_int => 0
proto_binary_fetched_bigint => 0
proto_binary_fetched_decimal => 0
proto_binary_fetched_float => 0
proto_binary_fetched_double => 0
proto_binary_fetched_date => 0
proto_binary_fetched_year => 0
proto_binary_fetched_time => 0
proto_binary_fetched_datetime => 0
proto_binary_fetched_timestamp => 0
proto_binary_fetched_string => 0
proto_binary_fetched_json => 0
proto_binary_fetched_blob => 0
proto_binary_fetched_enum => 0
proto_binary_fetched_set => 0
proto_binary_fetched_geometry => 0
proto_binary_fetched_other => 0
init_command_executed_count => 0
init_command_failed_count => 0
com_quit => 0
com_init_db => 0
com_query => 0
com_field_list => 0
com_create_db => 0
com_drop_db => 0
com_refresh => 0
com_shutdown => 0
com_statistics => 0
com_process_info => 0
com_connect => 0
com_process_kill => 0
com_debug => 0
com_ping => 0
com_time => 0
com_delayed_insert => 0
com_change_user => 0
com_binlog_dump => 0
com_table_dump => 0
com_connect_out => 0
com_register_slave => 0
com_stmt_prepare => 0
com_stmt_execute => 0
com_stmt_send_long_data => 0
com_stmt_close => 0
com_stmt_reset => 0
com_stmt_set_option => 0
com_stmt_fetch => 0
com_deamon => 0
bytes_received_real_data_normal => 0
bytes_received_real_data_ps => 0

openssl

OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.1.1a  20 Nov 2018
OpenSSL Header Version => OpenSSL 1.1.1a  20 Nov 2018
Openssl default config => /etc/ssl/openssl.cnf

Directive => Local Value => Master Value
openssl.cafile => no value => no value
openssl.capath => no value => no value

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.42 2018-03-20
PCRE JIT Support => enabled

Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.jit => 1 => 1
pcre.recursion_limit => 100000 => 100000

PDO

PDO support => enabled
PDO drivers => mysql

pdo_mysql

PDO Driver for MySQL => enabled
Client API version => mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $

Directive => Local Value => Master Value
pdo_mysql.default_socket => /run/mysqld/mysqld.sock => /run/mysqld/mysqld.sock

readline

Readline Support => enabled
Readline library => EditLine wrapper

Directive => Local Value => Master Value
cli.pager => no value => no value
cli.prompt => \b \>  => \b \> 

redis

Redis Support => enabled
Redis Version => 4.2.0
Available serializers => php, igbinary

Directive => Local Value => Master Value
redis.arrays.autorehash => 0 => 0
redis.arrays.connecttimeout => 0 => 0
redis.arrays.distributor => no value => no value
redis.arrays.functions => no value => no value
redis.arrays.hosts => no value => no value
redis.arrays.index => 0 => 0
redis.arrays.lazyconnect => 0 => 0
redis.arrays.names => no value => no value
redis.arrays.pconnect => 0 => 0
redis.arrays.previous => no value => no value
redis.arrays.readtimeout => 0 => 0
redis.arrays.retryinterval => 0 => 0
redis.clusters.persistent => 0 => 0
redis.clusters.read_timeout => 0 => 0
redis.clusters.seeds => no value => no value
redis.clusters.timeout => 0 => 0
redis.session.lock_expire => 0 => 0
redis.session.lock_retries => 10 => 10
redis.session.lock_wait_time => 2000 => 2000
redis.session.locking_enabled => 0 => 0

Reflection

Reflection => enabled
Version => $Id: f1096fbe817b0413895286a603375570e78fb553 $

session

Session Support => enabled
Registered save handlers => files user redis rediscluster 
Registered serializer handlers => php_serialize php php_binary 

Directive => Local Value => Master Value
session.auto_start => Off => Off
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => no value => no value
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => 0 => 0
session.gc_divisor => 1000 => 1000
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.lazy_write => On => On
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => no value => no value
session.serialize_handler => php => php
session.sid_bits_per_character => 5 => 5
session.sid_length => 26 => 26
session.upload_progress.cleanup => On => On
session.upload_progress.enabled => On => On
session.upload_progress.freq => 1% => 1%
session.upload_progress.min_freq => 1 => 1
session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix => upload_progress_ => upload_progress_
session.use_cookies => 1 => 1
session.use_only_cookies => 1 => 1
session.use_strict_mode => 0 => 0
session.use_trans_sid => 0 => 0

SimpleXML

Simplexml support => enabled
Revision => $Id: 341daed0ee94ea8f728bfd0ba4626e6ed365c0d1 $
Schema support => enabled

SPL

SPL support => enabled
Interfaces => OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

standard

Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i 

Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.exception => 0 => 0
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
from => no value => no value
session.trans_sid_hosts => no value => no value
session.trans_sid_tags => a=href,area=href,frame=src,form= => a=href,area=href,frame=src,form=
url_rewriter.hosts => no value => no value
url_rewriter.tags => form= => form=
user_agent => no value => no value

xml

XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.8

Zend OPcache

Opcode Caching => Disabled
Optimization => Disabled
SHM Cache => Enabled
File Cache => Disabled

Directive => Local Value => Master Value
opcache.blacklist_filename => no value => no value
opcache.consistency_checks => 0 => 0
opcache.dups_fix => Off => Off
opcache.enable => Off => Off
opcache.enable_cli => Off => Off
opcache.enable_file_override => Off => Off
opcache.error_log => no value => no value
opcache.file_cache => no value => no value
opcache.file_cache_consistency_checks => 1 => 1
opcache.file_cache_only => 0 => 0
opcache.file_update_protection => 2 => 2
opcache.force_restart_timeout => 180 => 180
opcache.huge_code_pages => Off => Off
opcache.inherited_hack => On => On
opcache.interned_strings_buffer => 16 => 16
opcache.lockfile_path => /tmp => /tmp
opcache.log_verbosity_level => 1 => 1
opcache.max_accelerated_files => 10000 => 10000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5
opcache.memory_consumption => 128M => 128M
opcache.opt_debug_level => 0 => 0
opcache.optimization_level => 0x7FFFBFFF => 0x7FFFBFFF
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
opcache.restrict_api => no value => no value
opcache.revalidate_freq => 60 => 60
opcache.revalidate_path => Off => Off
opcache.save_comments => 1 => 1
opcache.use_cwd => On => On
opcache.validate_permission => Off => Off
opcache.validate_root => Off => Off
opcache.validate_timestamps => On => On

zlib

ZLib Support => enabled
Stream Wrapper => compress.zlib://
Stream Filter => zlib.inflate, zlib.deflate
Compiled Version => 1.2.11
Linked Version => 1.2.11

Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value

Additional Modules

Module Name

Environment

Variable => Value
XXXX
toredash commented 5 years ago

Well I found it something, sort of.

If I delete config/config.php altogether, it works. But then I'm not able to define variables that are arrays, e.g. `cors_domain[] = ``

Making a new issue as this got noisy

tsteur commented 5 years ago

If I delete config/config.php altogether, it works. But then I'm not able to define variables that are arrays, e.g. `cors_domain[] = ``

Can you maybe roughly post what the content of that file looks like? Maybe there's a way to improve that part?

toredash commented 5 years ago

I've posted my full config in #2 but can add it here as well;

; <?php exit; ?> DO NOT REMOVE THIS LINE
; file automatically generated or modified by Matomo; you can manually override the default values in global.ini.php by redefining them in this file.
[database]
host = "%%DBHOST%%"
username = "%%MYSQL_USER%%"
password = "%%MYSQL_PASSWORD%%"
dbname = "%%MYSQL_DBNAME%%"
tables_prefix = "matomo_"

[General]
salt = "%%MATOMO_SALT%%"
trusted_hosts[] = "%%MATOMO_HOSTNAME%%"
trusted_hosts[] = "%%MATOMO_TRACKER_HOSTNAME%%"

;TODO: Fix
cors_domains[] = *

; disable browser trigger archiving for all requests (even those with a segment)
browser_archiving_disabled_enforce = 0

multi_server_environment = 1

; when set to 1, all requests to Matomo will return a maintenance message without connecting to the DB
; this is useful when upgrading using the shell command, to prevent other users from accessing the UI while Upgrade is in progress
maintenance_mode = %%MATOMO_MAINTENANCE_MODE%%

; by default, the real time Live! widget will update every 5 seconds and refresh with new visits/actions/etc.
; you can change the timeout so the widget refreshes more often, or not as frequently
live_widget_refresh_after_seconds = 10

; by default, the Live! real time visitor count widget will check to see how many visitors your
; website received in the last 3 minutes. changing this value will change the number of minutes
; the widget looks in.
live_widget_visitor_count_last_minutes = 5

; In "All Websites" dashboard, when looking at today's reports (or a date range including today),
; the page will automatically refresh every 5 minutes. Set to 0 to disable automatic refresh
multisites_refresh_after_seconds = 0

; If set to 1, Matomo will automatically redirect all http:// requests to https://
; If SSL / https is not correctly configured on the server, this will break Matomo
; If you set this to 1, and your SSL configuration breaks later on, you can always edit this back to 0
; it is recommended for security reasons to always use Matomo over https
force_ssl = 1
assume_secure_protocol = 1

; by default, an update notification for a new version of Matomo is shown to every user. Set to 1 if only
; the superusers should see the notification.
show_update_notification_to_superusers_only = 1

; Uncomment line below if you use a standard proxy
proxy_client_headers[] = HTTP_X_FORWARDED_FOR
proxy_host_headers[] = HTTP_X_FORWARDED_HOST

; In some rare cases it may be useful to explicitely tell Matomo not to use LOAD DATA INFILE
; This may for example be useful when doing Mysql AWS replication
enable_load_data_infile = 1

; by default, Matomo uses PHP's built-in file-based session save handler with lock files.
; For clusters, use dbtable.
; We did use redis, but not supported since 3.8.0
session_save_handler = dbtable

; If set to 0 it will disable advertisements for providers of Professional Support for Matomo.
piwik_professional_support_ads_enabled = 0

; By setting this option to 0, it will disable the "Auto update" feature
enable_auto_update = 0

; By setting this option to 0 (e.g. in common.config.ini.php) the installer will be disabled.
enable_installer = %%MATOMO_ENABLE_INSTALLER%%

; By setting this option to 0:
; - links to Enable/Disable/Uninstall plugins will be hidden and disabled
; - links to Uninstall themes will be disabled (but user can still enable/disable themes)
enable_plugins_admin = 0

; By setting this option to 1, it will be possible for Super Users to upload Matomo plugin ZIP archives directly in Matomo Administration.
; Enabling this opens a remote code execution vulnerability where
; an attacker who gained Super User access could execute custom PHP code in a Matomo plugin.
enable_plugin_upload = 0

; By default we check whether the Custom logo is writable or not, before we display the Custom logo file uploader
enable_custom_logo_check = 0

; If you use this Matomo instance over multiple hostnames, Matomo will need to know
; a unique instance_id for this instance, so that Matomo can serve the right custom logo and tmp/* assets,
; independently of the hostname Matomo is currently running under.
instance_id = %%MATOMO_HOSTNAME%%

[log]
; possible values for log: screen, database, file
log_writers[] = screen

; log level, everything logged w/ this level or one of greater severity
; will be logged. everything else will be ignored. possible values are:
; ERROR, WARN, INFO, DEBUG
log_level = %%MATOMO_LOG_LEVEL%%

[Plugins]
Plugins[] = "CorePluginsAdmin"
Plugins[] = "CoreAdminHome"
Plugins[] = "CoreHome"
Plugins[] = "WebsiteMeasurable"
Plugins[] = "IntranetMeasurable"
Plugins[] = "Diagnostics"
Plugins[] = "CoreVisualizations"
Plugins[] = "Proxy"
Plugins[] = "API"
Plugins[] = "ExamplePlugin"
Plugins[] = "Widgetize"
Plugins[] = "Transitions"
Plugins[] = "LanguagesManager"
Plugins[] = "Actions"
Plugins[] = "Dashboard"
Plugins[] = "MultiSites"
Plugins[] = "Referrers"
Plugins[] = "UserLanguage"
Plugins[] = "DevicesDetection"
Plugins[] = "Goals"
Plugins[] = "Ecommerce"
Plugins[] = "SEO"
Plugins[] = "Events"
Plugins[] = "UserCountry"
Plugins[] = "GeoIp2"
Plugins[] = "VisitsSummary"
Plugins[] = "VisitFrequency"
Plugins[] = "VisitTime"
Plugins[] = "VisitorInterest"
Plugins[] = "ExampleAPI"
Plugins[] = "RssWidget"
Plugins[] = "Feedback"
Plugins[] = "Monolog"
Plugins[] = "Login"
Plugins[] = TwoFactorAuth
Plugins[] = "UsersManager"
Plugins[] = "SitesManager"
Plugins[] = "Installation"
Plugins[] = "CoreUpdater"
Plugins[] = "CoreConsole"
Plugins[] = "ScheduledReports"
Plugins[] = "UserCountryMap"
Plugins[] = "Live"
Plugins[] = "CustomVariables"
Plugins[] = "PrivacyManager"
Plugins[] = "ImageGraph"
Plugins[] = "Annotations"
Plugins[] = "MobileMessaging"
Plugins[] = "Overlay"
Plugins[] = "SegmentEditor"
Plugins[] = "Insights"
Plugins[] = "Morpheus"
Plugins[] = "Contents"
Plugins[] = "BulkTracking"
Plugins[] = "Resolution"
Plugins[] = "DevicePlugins"
Plugins[] = "Heartbeat"
Plugins[] = "Intl"
Plugins[] = "Marketplace"
Plugins[] = "ProfessionalServices"
Plugins[] = "UserId"
Plugins[] = "CustomPiwikJs"
Plugins[] = "QueuedTracking"
Plugins[] = "DBStats"
Plugins[] = "TasksTimetable"
Plugins[] = "CustomDimensions"
Plugins[] = "CustomReports"
Plugins[] = "InvalidateReports"
Plugins[] = "EnvironmentVariables"

[PluginsInstalled]
PluginsInstalled[] = "Diagnostics"
PluginsInstalled[] = "Login"
PluginsInstalled[] = TwoFactorAuth
PluginsInstalled[] = "CoreAdminHome"
PluginsInstalled[] = "UsersManager"
PluginsInstalled[] = "SitesManager"
PluginsInstalled[] = "Installation"
PluginsInstalled[] = "Monolog"
PluginsInstalled[] = "Intl"
PluginsInstalled[] = "CorePluginsAdmin"
PluginsInstalled[] = "CoreHome"
PluginsInstalled[] = "WebsiteMeasurable"
PluginsInstalled[] = "IntranetMeasurable"
PluginsInstalled[] = "CoreVisualizations"
PluginsInstalled[] = "Proxy"
PluginsInstalled[] = "API"
PluginsInstalled[] = "ExamplePlugin"
PluginsInstalled[] = "Widgetize"
PluginsInstalled[] = "Transitions"
PluginsInstalled[] = "LanguagesManager"
PluginsInstalled[] = "Actions"
PluginsInstalled[] = "Dashboard"
PluginsInstalled[] = "MultiSites"
PluginsInstalled[] = "Referrers"
PluginsInstalled[] = "UserLanguage"
PluginsInstalled[] = "DevicesDetection"
PluginsInstalled[] = "Goals"
PluginsInstalled[] = "Ecommerce"
PluginsInstalled[] = "SEO"
PluginsInstalled[] = "Events"
PluginsInstalled[] = "UserCountry"
PluginsInstalled[] = "GeoIp2"
PluginsInstalled[] = "VisitsSummary"
PluginsInstalled[] = "VisitFrequency"
PluginsInstalled[] = "VisitTime"
PluginsInstalled[] = "VisitorInterest"
PluginsInstalled[] = "ExampleAPI"
PluginsInstalled[] = "RssWidget"
PluginsInstalled[] = "Feedback"
PluginsInstalled[] = "CoreUpdater"
PluginsInstalled[] = "CoreConsole"
PluginsInstalled[] = "ScheduledReports"
PluginsInstalled[] = "UserCountryMap"
PluginsInstalled[] = "Live"
PluginsInstalled[] = "CustomVariables"
PluginsInstalled[] = "PrivacyManager"
PluginsInstalled[] = "ImageGraph"
PluginsInstalled[] = "Annotations"
PluginsInstalled[] = "MobileMessaging"
PluginsInstalled[] = "Overlay"
PluginsInstalled[] = "SegmentEditor"
PluginsInstalled[] = "Insights"
PluginsInstalled[] = "Morpheus"
PluginsInstalled[] = "Contents"
PluginsInstalled[] = "BulkTracking"
PluginsInstalled[] = "Resolution"
PluginsInstalled[] = "DevicePlugins"
PluginsInstalled[] = "Heartbeat"
PluginsInstalled[] = "Marketplace"
PluginsInstalled[] = "ProfessionalServices"
PluginsInstalled[] = "UserId"
PluginsInstalled[] = "CustomPiwikJs"
PluginsInstalled[] = "QueuedTracking"
PluginsInstalled[] = "TagManager"
PluginsInstalled[] = "DBStats"
PluginsInstalled[] = "TasksTimetable"
PluginsInstalled[] = "CustomDimensions"
PluginsInstalled[] = "CustomReports"
PluginsInstalled[] = "InvalidateReports"
PluginsInstalled[] = "EnvironmentVariables"

[QueuedTracking]
notify_queue_threshold_single_queue = 250000
; Below config is not really needed sincce the processQueue.sh script queries Redis manually before starting an process-job
backend = "redis"
redisHost = "%%REDIS_HOST%%"
redisPort = 6379
redisDatabase = 2
redisPassword = ""
queueEnabled = true
numQueueWorkers = %%QUEUEDTRACKING_WORKERS%%
processDuringTrackingRequest = false
numRequestsToProcess = %%QUEUEDTRACKING_NUM_REQUEST_TO_PROCESS%%
useSentinelBackend = false
sentinelMasterName = "HardCodedIn config.ini.php"

[Cache]
; available backends are 'file', 'array', 'null', 'redis', 'chained'
; 'array' will cache data only during one request
; 'null' will not cache anything at all
; 'file' will cache on the filesystem
; 'redis' will cache on a Redis server, use this if you are running Matomo with multiple servers. Further configuration in [RedisCache] is needed
; 'chained' will chain multiple cache backends. Further configuration in [ChainedCache] is needed
backend = %%MATOMO_CACHE_BACKEND%%

[ChainedCache]
backends[] = "array"
backends[] = redis

[RedisCache]
; Redis server configuration.
host = "%%REDIS_HOST%%"
port = 6379
; instead of host and port a unix socket path can be configured
;unix_socket = ""
timeout = 0.0
password = ""
database = 0
; In case you are using queued tracking: Make sure to configure a different database! Otherwise queued requests might
; be flushed

[Debug]
enable_sql_profiler = %%MATOMO_SQL_PROFILING%%
tsteur commented 5 years ago

I meant the config/config.php you mentioned

tsteur commented 5 years ago

I see you meant config.ini.php. It works for me here even if the file exists and it should definitely work when it exists.

toredash commented 5 years ago

@tsteur configuration issue with PHP-FPM. Please review PR #3 for improved docs.

toredash commented 5 years ago

The reason it did not work for me is that PHP-FPM does not get access to ENVs by default. The PR #3 add some documentation bits for this particular setup.

tsteur commented 5 years ago

Thanks 👍