Matomo after upgrade warnings related to running on Windows system

Hello,

I’m not sure if this should be called a bug but matomo is trying to perform actions after upgrade without checking if it is runned on Windows.

×
WARNING: PATHTOMATOMOINSTALLATION\core\Filechecks.php(160): Warning - shell_exec(): Unable to execute 'whoami' - Matomo 4.0.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: CoreUpdater, Action: newVersionAvailable, In CLI mode: false)
×
WARNING: PATHTOMATOMOINSTALLATION\core\Filechecks.php(149): Warning - shell_exec(): Unable to execute 'groups | cut -f3 -d" "' - Matomo 4.0.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: CoreUpdater, Action: newVersionAvailable, In CLI mode: false)
×
WARNING: PATHTOMATOMOINSTALLATION\core\Filechecks.php(160): Warning - shell_exec(): Unable to execute 'whoami' - Matomo 4.0.0 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: CoreUpdater, Action: newVersionAvailable, In CLI mode: false)

can this be handled by skipping this commans on Windows system after upgrade?

Thanks

Hi,

In theory all cases where this code is called are already checking before if one is using Windows.

Can you maybe enable logging (https://matomo.org/faq/troubleshooting/faq_115/) and try to get a stack trace (showing which function called this function)

Could you maybe create a test.php file with this content in your Matomo directory and access it via the browser:

<?php

include "vendor/autoload.php";

var_dump(\Piwik\SettingsServer::isWindows());

It should show bool(true) if you are using Windows.

Yes. Response is:

bool(true)

When it comes to mentioned warning they appear every time I upgrade Matomo. After closing them they are not appearing until next update.

Hi,

This is indeed weird. Without a stacktrace it is hard to diagnose and I don’t have Windows to reproduce anything. Thankfully the warning should not break anything, so you can ignore it.

I was ignoring it for a long time now but this time I just wanted to let you know that something like that happens :slight_smile:

I try to enable stack trace before next update

1 Like