Error when calling isSupportedWithReason from CliMulti on Windows #18605
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
Regression
Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone
Another one :)
I've seen really strange error messages since a while in our Apache log which have no timestamp or what so ever.
After checking every application i finally found the problem in Matomo (Current version).
The call stack from
matomo/core/CliMulti/Process.php
Line 206 in ec3e220
with the stack
matomo/core/CliMulti/Process.php
Line 243 in ec3e220
matomo/core/CliMulti/Process.php
Line 255 in ec3e220
and the stack
matomo/core/CliMulti/Process.php
Line 234 in ec3e220
matomo/core/CliMulti/Process.php
Line 250 in ec3e220
both result in commands executed on windows
ps x
andawk...
that not exist on windows.There are even more commands, that are all suppressed with @shell_exec that do not throw a Matomo error, but still log errors on the windows apache, because commands are tried to execute, which apache then logs as errors without useful information.
A general check for commands should be implemented, to check for windows or not. Some shell_exec are already pre-cechekd with isWindows checks, but not all.
More examples:
matomo/core/CliMulti/Process.php
Line 263 in ec3e220
Maybe a fix for the whole canse of
isSupportedWithReason
could be, when on windows, just skip all other checks. As theisWindows
check already return that is not possible on windows so further checks are useless, aren't they?The text was updated successfully, but these errors were encountered: