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...