matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.91k stars 2.65k forks source link

Archiving can fail on platforms with multiple php versions installed #5328

Open anonymous-matomo-user opened 10 years ago

anonymous-matomo-user commented 10 years ago

The archiving process, or namely, the asynchronous support, tends to fail on platforms with multiple installed PHP versions. This is a common practice on shared hosts, but it makes running PHP via command line much more difficult.

The main issues are twofold:

These issues are particularly problematic on web crons, since the web cron can fail completely when, for example, it tries to run the Piwik script using PHP version prior to 5.3 (due to lack of namespace support).

Running core:arhive via CLI allows these to be somewhat avoided by using PHPRC environment variable to define the php.ini location and by running the console script using correct PHP version.

I'd imagine easiest way to avoid these problems could be allowing configuration of the PHP binary and location of the php.ini or simply by making it possible to manually disable asynchronous archiving.

mattab commented 10 years ago

Thanks for the report. Maybe we could add a new parameter to the script to let user specify the path to PHP binary?