How to make Terminal use MAMP’s PHP

preview_player
Показать описание
How to make Terminal use MAMP’s PHP

COMANDS:
1) 'which php'
2) 'echo $PATH'
3) 'sudo nano ~/.bash_profile'
PATH=/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php/php7.3.3/bin:$PATH
4) 'source ~/.bash_profile'

MacOSX has Apache + PHP server by default.
When you enter the PHP command in Terminal, the version of PHP that comes with MacOSX is used.
But if you are installing MAMP, you need the version you are using to be the one that ships with MAMP.
So let's inform Terminal about the existence of PHP MAMP binaries and use them instead of the ones that come with MacOSX.
Рекомендации по теме