regarding the bizarre behaviour of 2.: root@nextcloud:~ # php-fpm -i | egrep --color 'PATH|env' cgi.redirect_status_env => no value => no value PATH => /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin $_SERVER['PATH'] => /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
But:
$ LANG=EN wget --no-check-certificate -O - https://172.16.240.39/phpinfo.php | lynx -stdin --dump | egrep -i 'env|path'
--2020-09-01 15:13:24-- https://172.16.240.39/phpinfo.php
Connecting to 172.16.240.39:443... connected.
The certificate's owner does not match hostname '172.16.240.39'
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'STDOUT'
- [ <=> ] 77.40K --.-KB/s in 0.003s
2020-09-01 15:13:24 (25.4 MB/s) - written to stdout [79253]
Configuration File (php.ini) Path /usr/local/etc
cgi.discard_path 0 0
cgi.fix_pathinfo 1 1
cgi.redirect_status_env no value no value
include_path .:/usr/local/share/pear .:/usr/local/share/pear
realpath_cache_size 4096K 4096K
realpath_cache_ttl 120 120
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
XPath Support enabled
openssl.capath no value no value
session.cookie_path / /
session.save_path no value no value
Path to sendmail /usr/sbin/sendmail -t -i
opcache.lockfile_path /tmp /tmp
opcache.revalidate_path Off Off
Environment
$_SERVER['LD_LIBRARY_PATH'] /usr/local/lib:/usr/local/lib
$_SERVER['PATH'] /sbin:/bin:/usr/sbin:/usr/bin
I’m missing the line PATH => /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin