/misc/cron/archive.php ignoring PIWIK_USER_PATH set in /bootstrap.php #20327
Labels
Potential Bug
Something that might be a bug, but needs validation and confirmation it can be reproduced.
Milestone
I use to define my own PIWIK_USER_PATH in /bootstrap.php to alter the path of the config.ini.php-file. But when calling /misc/cron/archive.php PIWIK_USER_PATH is already set BEFORE /bootstrap.php is called.
Expected Behavior
/bootstrap.php should be called before PIWIK_USER_PATH is set in /misc/cron/archive.php
Current Behavior
/bootstrap.php is called AFTER PIWIK_USER_PATH is already set in /misc/cron/archive.php
Possible Solution
/misc/cron/archive.php
Steps to Reproduce (for Bugs)
Create a /bootstrap.php-file with this content:
define('PIWIK_USER_PATH', $_SERVER['DOCUMENT_ROOT'].'/my-new-path-to-matomo-config/');
Move config.ini.php to $_SERVER['DOCUMENT_ROOT'].'/my-new-path-to-matomo-config/'
call /misc/cron/archive.php
=> Warning: Constant PIWIK_USER_PATH already defined in ...\matomo\bootstrap.php on line 1
=> cron-job is not working, instead the installation-page is shown
Context
I'm moving the config-file to another location, because I want to use matomo on different servers and don't want to override the config.ini.php on updates.
The text was updated successfully, but these errors were encountered: