When using pear from shell php not found

Properties ID: 000002
Filed under:
When trying to run ./pear you get this or similar error message:
$ ./pear mage-setup
Running initial setup...
exec: 94: php: not found
The issue is that each *NIX setup can have PHP executable located in different place, and you will need to edit ./pear file to accomodate this. Just replace:
With your location of PHP CLI executable and you should be good to go. Another thing to watch is that your PHP CLI should have the same configuration and php extensions as PHP used in webservice, to avoid issues with PEAR package php extension dependencies.