On May 15, 2009, at 4:48 AM, sohdubom wrote:
Thanks Igor and Scott for the great tips,
Since I was previously following Scott's instructions I decided to try his last tip and changed the $PATH to: export PATH=/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php5/bin: $PATH
Now when I run phpinfo() in TM I get the right PHP from MAMP: PhpMate r11069 running PHP 5.2.6 (cli) (/Applications/MAMP/bin/php5/ bin/php)
Good news, it is working then.
note: the strange thing is that when I run phpinfo() from TM, my MAMP server was not running, is it ok?
Yes, the webserver is just that, a webserver, TM is running php via the command line binary, therefor the webserver does not need to be up.
The echo $PATH now returns: /Applications/MAMP/Library/bin:/Applications/MAMP/bin/php5/bin:/usr/ bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
Looks good to me.
The which -a php returns: /Applications/MAMP/bin/php5/bin/php /usr/bin/ph
Also looks good.
This was a needed change for you, you really want your path to reflect the fact that you have installed a new php. Now when you are in the command line, you can just use `php` instead of the entire path. You now know for sure, you are not ever going to be using the Apple php unless you explicitly tell the shell to do so.
Jibberia had a nice suggestion as well, which would have been a great way to get TM to work how you wanted it right away. However, in the long run, I think best to get your environment variables set and understood.