@tsteur opened this Pull Request on December 18th 2019 Member

Not sure if it's possible but maybe a regular request is not using CGI, but then the CLI request is if findPhpBinary returns a cgi script?

See https://www.php.net/manual/en/function.shell-exec.php
In Matomo for WordPress seeing various reports where the output starts with #!/usr/bin/env php.


refs https://github.com/matomo-org/matomo/pull/15277
refs https://github.com/matomo-org/wp-matomo/issues/135#issuecomment-566766633

Trying to reproduce this locally this happens:

php -r "echo shell_exec(\"php-cgi app/console climulti:request -q  'module=API&method=API.get&idSite=1&period=day&date=last19&format=php&trigger=archivephp' --superuser\");"
X-Powered-By: PHP/7.3.12
Content-type: text/html; charset=UTF-8

Where it prints x-powered by etc

@tsteur commented on December 18th 2019 Member
This Pull Request was closed on December 18th 2019
Powered by GitHub Issue Mirror