Upgrade PHP on macOS using binaries from liip.ch.
Information
This tutorial describes what to do if you have installed a PHP version using command:
curl -s https://php-osx.liip.ch/install.sh | bash -s X.X
and you want to install a different PHP version on the macOS.
If you have never used https://php-osx.liip.ch/install.sh before, see tutorial:
Installing PHP5.6.30 on macOS Sierra
Operating system used
macOS Sierra
Software prerequisites
None
Procedure
- If you have installed a PHP version using https://php-osx.liip.ch/install.sh, it will be installed in path:
/usr/local
For example you have previously installed PHP 5.6.30:
/usr/local/php5-5.6.30-20170506-093822
and a symbolic link php5 -> /usr/local/php5-5.6.30-20170506-093822 is created.
- On the website https://php-osx.liip.ch
a new release is available, for example: PHP 5.6.31
- To install the new version type:
curl -s https://php-osx.liip.ch/install.sh | bash -s 5.6
Note: It will always install the latest "patch" version, in this case: 5.6.31
- The new PHP version is installed in path:
/usr/local/php5-5.6.31-20170817-164511
and a symbolic link php5 -> /usr/local/php5-5.6.31-20170817-164511 is created.
- If you have installed multiple PHP versions and want to switch versions, use the following command
to change the symbolic link:
sudo ln -sf /usr/local/php5-5.6.30-20170506-093822 php5
|