When I try to run "which php" from my magento root folder , this say: /usr/bin/php

But, I need that this point php to: /Applications/AMPPS/php/bin/php

How can I do it?

2 Answers 2


you can use complete path to run php. In my case file located in /opt/lampp/bin/php

/opt/lampp/bin/php bin/magento deploy:mode:show

for you start from root folder

/Applications/AMPPS/php/bin/php bin/magento deploy:mode:show

This is the solution I found for mac and it worked for me. Open Terminal and run following command.

    $    export AMPPS_PHP=/Applications/AMPPS/php/bin
    $    export PATH="$AMPPS_PHP:$PATH"

Source: http://www.ampps.com/wiki/Installing_Laravel_Framework

  • is this permanent or for the current session only? Mar 5, 2018 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.