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

New INI setting to set the absolute path to a PHP binary file in case Matomo cannot detect your PHP binary #15611

Merged
merged 7 commits into from Feb 26, 2020

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Feb 23, 2020

see #15285 (comment)

Where it matched this path /usr/local/lsws/lsphp72/bin/php.

Alternatively, user suggests to exec /path/to/php -v to detect it but not sure this always work or has other issues.

@tsteur tsteur added the Needs Review PRs that need a code review label Feb 23, 2020
@tsteur tsteur added this to the 4.0.0 milestone Feb 23, 2020
@diosmosis
Copy link
Member

Could we also add a INI or DI config option so users can just set it themselves if they have to?

@tsteur
Copy link
Member Author

tsteur commented Feb 23, 2020

Yes, I was actually thinking about this a few times and was not sure why we don't have it yet. Maybe because it could become outdated. On the other side things still work even if not configured, will simply not use CLI archiving then. Would we still need to make sure they don't configure eg php-cgi I guess?

@diosmosis
Copy link
Member

Maybe because it could become outdated.

This sounds like a general problem, lots of things in a system could change resulting in a broken matomo. Perhaps it might help to regularly run the system check (like once a day or something) and display any errors as error notifications. In another PR of course.

For this I was just thinking of a workaround so next time we don't necessarily have to make a code change to fix it for a user. Could just be in DI?

@tsteur
Copy link
Member Author

tsteur commented Feb 23, 2020

@diosmosis added a config entry to the global ini and not DI as it's otherwise hard to describe how to change it and hard to expose documentation for it etc. Wasn't sure what to describe in the doc when it is useful since configuring it doesn't ensure that CLI archiving will actually work if other criteria are still not fulfilled. Should be enough though maybe. Will likely need to fix ui tests for the config later.

@diosmosis diosmosis merged commit 35467f5 into 4.x-dev Feb 26, 2020
@diosmosis diosmosis deleted the 15285_1 branch February 26, 2020 08:08
@mattab mattab changed the title Only detect php type based on file name New INI setting to set the absolute path to a PHP binary file in case Matomo cannot detect your PHP binary Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants