thanks for your reply and code example. it will work. however, I want my script.sh to get all environment configuration as I get in bash terminal. it's not a question of just PATH, but all other env variables. They are NOT initialized now, when I do shell_exec(). Why?