PHP system calls and $PATH in OS X
问题 I'm trying to get PHP to make system calls on OS X. However, it doesn't seem to be able to find anything that's included in the system path. When I run... putenv("PATH={$_SERVER["PATH"]}:/usr/local/bin"); ... just before the system call, it works. This is not a practical solution, since the code that executes the system call is a plugin, so I'd rather not touch source code that'll make it incompatible come an update. Apache2 is running as the same user as I'm logged in, so theoretically it