PHP exec $PATH variable missing elements

后端 未结 3 1274
春和景丽
春和景丽 2020-11-27 07:59

When I echo $PATH on my command line, it returns

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/MAMP/Library/bin:/usr/local/git/bi         


        
3条回答
  •  半阙折子戏
    2020-11-27 08:26

    Environment variables on Mac OS X are set by differing mechanisms depending on how your code, or its parent process, was launched. To insure that items launched from an interactive shell and items launched by the WindowServer have the same path, you need to keep ~/.MacOSX/environment.plist in sync with what is set in .profile (or .cshrc).

提交回复
热议问题