- follow the installation instructions in T188745 with default limits set (300M memory)
- edit a wiki page and insert a <math>formula </math>
- press "show preview"
- Mathoid cli /path/to/cli.js is not executable. and no formula shown
Doing the same from CLI as the web server user worked:
sudo -H -u www-data bash -c 'php -r "echo exec(\"/path/to/mathoid/cli.js -c /path/to/mathoid/config.yaml\");"'
- Error message: Memory limit exhausted, please adjust $wgMaxShellMemory
$result->getExitCode() != 0 only indicates that something went wrong during execution.
Anytime, when execute mathoid/cli.js failed, only logging Mathoid cli mathoid/cli.js is not executable message (logging point). This will make operator messy, because the real reason is often not that the file is not executable, such as Nodejs throw an error or failed to execute shell command.
Logging error messages from STDERR at the same time would be better.