Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Take A QuizChallenge yourself and boost your learning! Start the quiz now to earn credits.
Take A QuizUnlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Take A QuizKindly log in to use this feature. We’ll take you to the login page automatically.
LoginGeneral Tech Bugs & Fixes 3 years ago
User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
Unix shells look for an environment variable called PATH to tell them a prioritized list of directory paths in which to look for commands (executable files). Your PATH variable needs to have /usr/local/php5/bin before /usr/bin if you want it to find your new custom local version of PHP instead of the default system version.
To do this on the fly, enter this command:
PATH="/usr/local/php5/bin:$PATH"
To make this change stick for your account, add that command to the appropriate startup script for zsh, such as .zshenv, .zshrc, or .zshprofile.
To make this change stick for all shells for all accounts on your system, add /usr/local/php5/bin to the top of /etc/paths.
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Kindly log in to use this feature. We’ll take you to the login page automatically.
LoginReady to take your education and career to the next level? Register today and join our growing community of learners and professionals.
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
manpreet
Best Answer
3 years ago
I was wondering if someone could help me.
Im running https://forum.tuteehub.com/tag/mavericks">mavericks OSX ... When i type php -v i get the following:
I needed to upgrade the PHP version, so i followed an https://forum.tuteehub.com/tag/online">online guide and updated via the command
The installation seems to be successful, and installs the new php to
But when i run php -v from the command line, i still get the same php version as in the beginning.
If i run /usr/local/php5/bin/php -v i get the correct version im looking for, which is
Also, when i run which php i get
How do i https://forum.tuteehub.com/tag/change">change it so that when i type php -v it shows the updated version?
One more https://forum.tuteehub.com/tag/thing">thing .. Im using the zsh shell.
Any help would be greatly appreciated.
Cheers,