Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anonymous-matomo-user opened this issue Jun 10, 2014 · 1 comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@anonymous-matomo-user
Copy link

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:

  • Piwik\CliMulti::findPhpBinary() locates the wrong PHP runtime and attempts to run the archiving script on too old PHP version.
  • Even if correct runtime is located, it may not necessarily run using the correct php.ini

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
Copy link
Member

mattab commented Jun 11, 2014

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

@anonymous-matomo-user anonymous-matomo-user added this to the 2.5.0 - Piwik 2.5.0 milestone Jul 8, 2014
@mattab mattab modified the milestones: Long term, Short term Oct 12, 2014
@mattab mattab modified the milestones: Long term, Mid term Dec 23, 2015
@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

2 participants