Skip to content

Conversation

Chrissitopher
Copy link
Contributor

matomo-org/matomo#14866, which is part of Matomo 3.12 and 3.13, changes how constants are used by Matomo. Now PIWIK_DOCUMENT_ROOT needs to be defined manually for FE calls. Without this, calling a frontend site fails with the following PHP error:

Use of undefined constant PIWIK_DOCUMENT_ROOT - assumed 'PIWIK_DOCUMENT_ROOT' (this will throw an Error in a future version of PHP) in piwik\core\Config.php on line 111
...
PHP Warning: require(PIWIK_DOCUMENT_ROOT/config/global.php): failed to open stream: No such file or directory in ...

Make sure to define PIWIK_DOCUMENT_ROOT before it is used.

Without this, calling a frontend site fails with the following PHP error 

Use of undefined constant PIWIK_DOCUMENT_ROOT - assumed 'PIWIK_DOCUMENT_ROOT' (this will throw an Error in a future version of PHP) in piwik\core\Config.php on line 111
...
PHP Warning:  require(PIWIK_DOCUMENT_ROOT/config/global.php): failed to open stream: No such file or directory in ...

The problem is caused by matomo-org/matomo#14866 Make sure to define PIWIK_DOCUMENT_ROOT before it is used.
@kaystrobach kaystrobach merged commit ee7a2f0 into kaystrobach:master Jan 10, 2020
@Chrissitopher Chrissitopher deleted the fix-PIWIK_DOCUMENT_ROOT branch January 11, 2020 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants