Gensoki Gensoki - 3 months ago 22
PHP Question

Overwriting PHP Binary but .profile doesn't exist?

On http://php-osx.liip.ch/ 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

/usr/local/php5/bin/php
.

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

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

Fma Fma
Answer

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.

Comments