Asked  7 Months ago    Answers:  5   Viewed   31 times

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 | 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/

Not sure what went wrong and why it won't update...

Any ideas?




Use Homebrew:

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
Wednesday, March 31, 2021
answered 7 Months ago

On Mac OS X environment variables available in Terminal and for the normal applications can be different, check the related question for the solution how to make them similar.

Note that this solution will not work on Mountain Lion (10.8).

Saturday, May 29, 2021
answered 5 Months ago

You need to make sure that the newly installed php command is executed, not the default one.

Add the folder where the correct php binary resides as the first item to the $PATH environment variable.

Saturday, May 29, 2021
answered 5 Months ago

If you have both versions of PHP installed, you can switch between versions using the link and unlink brew commands.

For example, to switch between PHP 7.4 and PHP 7.3

brew unlink php@7.4
brew link php@7.3

PS: both versions of PHP have be installed for these commands to work.

Tuesday, June 15, 2021
answered 5 Months ago
brew install autoconf

Much easier solution

Sunday, June 27, 2021
answered 4 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :