Gensoki Gensoki - 1 year ago 89
PHP Question

Overwriting PHP Binary but .profile doesn't exist?

On it says
php-osx doesn't overwrite the php binaries installed by Apple, but installs everything in /usr/local/php5. The new php binary is therefore in


You can also adjust your
do include that directory, eg. write into your
file the following

export PATH="/usr/local/php5/bin:$PATH"
but when I goto
I don't see a
even when I run defaults write AppleShowAllFiles YES to show the hidden files

Fma Fma
Answer Source

First check which shell you are using by opening a terminal and entering following command:

echo $SHELL
  • If it prints /bin/zsh then you can add your export to the end of ~/.zshrc file.
  • If it prints /bin/bash or /usr/local/bin/bash you can use ~/.bashrc.
  • But if it is another shell check corresponding shell's configuration file.

Normally you can create the profile file yourself and shells would read it if it exists.