Confused about installing PHP5 cli
atma at convalesco.org
Tue Jul 14 14:54:59 PDT 2009
On 14 Ιουλ 2009, at 11:00 ΜΜ, mrbigpants wrote:
> Ryan Schmidt-24 wrote:
>>> There is PHP4 at /usr/local/bin (came w/ OSX, I think)
>> Apple does not supply any software in /usr/local;
> I misspoke. There is a php binary in /usr/bin, which I assume came
> w/ OS X.
> Should I reorder the paths in my PATH environment variable so that
> /opt/local/bin comes before /usr/bin? What's the best way to handle
> View this message in context: http://www.nabble.com/Confused-about-installing-PHP5-cli-tp24473478p24486760.html
> Sent from the MacPorts - Users mailing list archive at Nabble.com.
> macports-users mailing list
> macports-users at lists.macosforge.org
actually the way that makes sense for the user is, as you noted,
adjusting the path in your .bash_profile.
Here is mine:
devo:~ atma$ cat .bash_profile
#atma's profile options
The $PATH variable in the end is the system's predefined. This way the
user will use the binary in /opt/local/bin rather then /bin.
However for a system-wide configure you should use (let's say for
devo:~ atma$ ls /usr/bin/python
devo:~ atma$ which python
devo:~ atma$ sudo mv /usr/bin/python /usr/bin/
devo:~ atma$ sudo ln -sf /opt/local/bin/python /usr/bin/python
And the system-wide python would be the 1st one. However, I can't be
sure that this method will not cause troubles (that's why I choose not
to erase the original python binary).
It's better though, when using configuration files to give absolute
path to the binary you want to use, to avoid any envinroment issues.
Panagiotis (atma) Atmatzidis
email: atma at convalesco.org
GnuPG key id: 0xFC4E8BB4
The wise man said: "Never argue with an idiot. They bring you down to
their level and beat you with experience."
More information about the macports-users