I want to update php version, currently I have 5.5.38 and I want 7.1
What I tried so far is using this command:
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.1
I tried several different versions but none of them worked. It opens bash_profile for a second and then I get Received SIGHUP or SIGTERM
and message below:
Buffer written to /Users/Morpheus/.bash_profile.save.6
Not sure what went wrong and why it won't update...
Any ideas?
Thanks.
To update the PHP version, update the brew using the command brew update . Then, use the command brew upgrade php . It upgrades the current version to the latest version of PHP. Then, restart the webserver to see the changes.
Install php
brew install [email protected]
Install the required PHP to your PATH
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.bash_profile source ~/.bash_profile
Then make sure it's all working
php -v php --version
This command will show you where your ini file is loaded
php --ini
I would probably recommend installing homebrew to manage such installations for you. With that installed you can just run the following command to install php7.1
brew update brew install php@71
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With