Php pages on /var/www/mypage
say system("foo.sh")
. foo.sh
is located on /one/dir
and contains command bar.sh
that is in /other/dir
. For a user using ssh connection and having /one/dir
and /other/dir
in PATH everything works.
Now, if I put
<Directory /var/www/mypage>
SetEnv PATH . . . :/one/dir:/other/dir
to Apache config, then print getenv("PATH");
on /var/www/mypage/mytest.php
shows that /one/dir
and /other/dir
are in the path. But system()
still does not found foo.sh
. What's wrong? And after this also foo.sh
should see the same PATH
so that it will find bar.sh
.
I am setting this on Ubuntu 20.04, PHP 7.4.3.