Matomo 3.9.1 cron issue: Cannot change cache limiter when headers already sent

I’m using the browser triggered archiving, but would like to use the recommended cron approach. However, if I visit the https://mydomain.dk/misc/cron/archive.php?token_auth=(mytokenhere) archiving seems to start out fine, but throws one error at me:

INFO CoreAdminHome[2019-05-25 06:54:29 UTC] [ddcec] Error: Empty or invalid response '#!/usr/bin/env php  Warning: session_cache_limiter(): Cannot change cache limiter when headers already sent in /home/oldrupdk/stats.oldrup.dk/core/bootstrap.php on line 32 ' for website id 2, Time elapsed: 7.815s, skipping

I’ve been testing this on two different shared but premium hosts, with PHP 7.3 (and 7.2).

Matomo was installed my Softacolous or similar tool, and has, besides this little issue, been running fine for half a year.

I’d like to fix this - any ideas?

Hi,

I have no idea, why this happens, but I have the feeling it has to do with your server as nearly all mentions of this warning that I can find are from you :slight_smile: (Archive.php empty response error and "Cannot change cache limiter" and "Module 'imagick' already loaded" warning in error log)

But in general I’d really recommend you to run the cron from the commandline (so the “real” cron) as this way you won’t run into timeouts.