When I start a shell script from Apache/PHP by shell_exec() PHP function, the environment inside this shell script is NOT set as it should be.
In particular, $PATH variable contains this:
PATH=/usr/bin:/bin:/usr/sbin:/sbin
Instead of what it normally contains when I work in Terminal.
It means that the shell ignores the /etc/profile file. The question is - how can I instruct apache/php/sh to work with /etc/profile?
In particular, $PATH variable contains this:
PATH=/usr/bin:/bin:/usr/sbin:/sbin
Instead of what it normally contains when I work in Terminal.
It means that the shell ignores the /etc/profile file. The question is - how can I instruct apache/php/sh to work with /etc/profile?