How to use MAMP's version of PHP instead of the default on OSX

前端 未结 7 1192
谎友^
谎友^ 2020-11-27 09:27

I would like to use MAMP\'s version of PHP instead of the default installed on my mac. I tried using

ln -s /Applications/MAMP/bin/php5.3/bin/php php <

7条回答
  •  执念已碎
    2020-11-27 10:16

    Well none of this was working for me with OSX10.12.5

    i have mac ports php70 installed at /opt/local/bin

    which php showed:

    /usr/bin/php
    

    I set up the aliases and local paths etc, which mostly worked for me, but other programs were failing (like composer) so the solution for me was to prepend:

    /opt/local/bin
    /opt/local/sbin
    

    to the file /etc/paths

    then it all worked a charm!

提交回复
热议问题