php - Cannot find true $PATH file on Mavericks -
i have both ~/.bash_profile
& ~/.profile
files.
~/.bash_profile
contains 1 line:
export path=/applications/mamp/bin/php5.5.3/bin:$path
~/.profile
contains 3 lines:
# macports installer addition on 2014-02-02_at_20:54:53: adding appropriate path variable use macports. export path=/applications/mamp/bin/php5.5.3/bin/:/opt/local/bin:/opt/local/sbin:$path # finished adapting path environment variable use macports.
as can see trying default php path use mamps php because have mcrypt installed on it. reason when type whereis php
native route: /usr/bin/php
, , when echo $path
get:
/applications/mamp/bin/php5.5.3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
somewhere have file thats controlling path , have no clue is. else controlling path route?
note: have homebrew, macports, xcode, , xcode command-line tools installed.
what you're seeing coming system-wide /etc/paths file. source of base $path environment variable before ~/.profile, ~/.bash_profile , others involved. if you're in terminal window, can edit following command:
sudo open -t /etc/paths
by default contains following paths:
/usr/bin /bin /usr/sbin /sbin /usr/local/bin
i wouldn't recommend editing file, however, because system-wide , affect every user on system.
if want complete control on $path, affect own account you're better off not including $path in .profile's export path lines. example (but not this):
export path=/applications/mamp/bin/php5.5.3/bin:/opt/local/bin:/opt/local/sbin
Comments
Post a Comment