I have installed zend server on my mac and i think that there are two installations of php on my mac (i hate mac bythe way, i'd love to get back to windows 7), i think that a script i'm running from the command line (phpcs) is using the php command that is inside /usr/bin/ while i'd like to use the one that's inside /usr/local/zend/bin/ always. How should i do that?
Asked
Active
Viewed 3,713 times
2 Answers
8
Add /usr/local/zend/bin to your PATH, before /usr/bin.
Or just uninstall the PHP in /usr/bin.

Alex Howansky
- 50,515
- 8
- 78
- 98
-
how do i uninstall it?If i understand correctly this comes with the standard distribution. – Nicola Peluchetti Mar 28 '12 at 16:32
-
Heh sorry, no idea, I'm not a Mac guy. At the least, you could rename it to /usr/bin/php.old or something. – Alex Howansky Mar 28 '12 at 16:35
-
Me neither, in the end i renamed the old php and made a simbolic link in /usr/bin/php to zend server php – Nicola Peluchetti Mar 28 '12 at 16:41
-
1There is no need to uninstall the default PHP...just ensure that you "prepend" /usr/local/zend/bin to your $PATH environment variable. – Wil Moore III Mar 28 '12 at 20:26
5
On Mac or Linux you can add the following to your bash shell (via ~/.bash_profile
or similar):
export PATH=/usr/local/zend/bin:$PATH
source /etc/zce.rc
Loading in /etc/zce.rc
sets up the system library path correctly and removes warnings about the crypto lib.

Tim
- 5,364
- 2
- 17
- 12