Output the PATH env variable:
echo getenv('PATH');
die();
These don’t work with a brew services
started httpd:
~/.bash_profile
~/.bashrc
~/.profile
/etc/paths
Instead env variables need to be added to the service’s .plist (see path via brew services list
):
/Library/LaunchDaemons/homebrew.mxcl.httpd.plist
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>