Execting php-scripts from the command line now does not work. When executing a script starting with #!/usr/bin/env php. I get this error message:
env: php: No such file or directory.
So it seems I can not run php as an executable script with /usr/bin/php.
I think what's causing my problem is that I followed these instructions for allowing MAMP’s copy of PHP to run from the terminal.
sudo mv /usr/bin/php /usr/bin/php-old
appears not to be working. php is not renamed.
If I should add something to my path. What should I add? When running echo $PATH:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin:/usr/X11/bin
Btw (don't know if it is related): MySQL is running but I can't access http://localhost/ when running:
sudo apachectl start
which php? Does it find your PHP installation? Does it work for every user account, or only for yours? – Daniel Beck Jul 7 '11 at 9:01