Upgraded PHP on Sierra

<OLD>
The PHP version on my Sierra was 5.6. I want to upgrade it to PHP 7.0 version. I followed a tutorial from https://coolestguidesontheplanet.com/upgrade-php-on-osx/.

PHP 7 would be installed in ‘/usr/local/php5/’ directory. Actually this is a symlink directory from ‘/usr/local/php5-7.0.18-20170506-095200/’ directory. Now I can use PHP 7.0 on my mac

But the php version on the terminal still show the old version. I need to change the $PATH like on this tutorial: https://stackoverflow.com/questions/25731145/mac-upgraded-php-to-5-6-but-cli-php-v-get-5-3-28:
Open Terminal, then run

Then add these 2 lines at the bottom of the file:

Save and reopen the terminal. Here is the new version:

</OLD>
NOW USE brew
REF: https://stackoverflow.com/questions/54207030/what-are-the-options-to-upgrade-php-on-macos-mojave-10-14-2
SEARCH PHP

INSTALL PHP 7.2

START SERVICE

ADD PATH

PHP.INI

MUST CLOSE THE TERMINAL THEN OPEN IT BACK TO CHECK THE PHP VERSION

PHP-FPM

CHANGE PHP SETTING

 

Leave a Reply

Your email address will not be published. Required fields are marked *