[TxMt] Re: How to config the internal TM preview browser to run the MAMP PHP engine?

Igor Sutton igorsutton at me.com
Fri May 15 06:24:55 UTC 2009


On May 15, 2009, at 12:44 AM, sohdubom wrote:

>
> Thanks Scott,
>
> but still not there yet ...
>
> 1. I created the .bash_profile following your instructions:
> ....then echo $PATH returned:
> ..../Applications/MAMP/conf:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/ 
> bin:/usr/X11/bin
> ....as expected, but
> ....which php returned:
> ..../usr/bin/php
>
> 2. and running phpinfo() within TM still points:
> .... PhpMate r11069 running PHP 5.2.6 (cli) (/usr/bin/php)
>
> any ideas?


I guess you need to configure this settings in your $HOME/.MacOSX/ 
environment.plist instead. I think TextMate doesn't use a shell or at  
least doesn't load your $HOME/.bash_profile file to run those commands.

If the file $HOME/.MacOSX/environment.plist doesn't exist on your  
home, you can execute the following commands on your Terminal:

mkdir ~/.MacOSX
touch ~/.MacOSX/environment.plist
open ~/.MacOSX/environment.plist

The last command will launch Property List Editor. If you don't have a  
line with "PATH" in there, you need to add another item (by clicking  
"Add Item") of String type, and add the same thing as you've seen on  
your .bash_profile. If it already exists, you can only put the  
location of your MAMP php bin directory (which in my case is / 
Applications/MAMP/bin).

Remember that applications launched by you outside Terminal usually  
don't read your ~/.bash_profile settings file.

You can find more information about environment.plist on this[1]  
article, and even a Python application to copy all your environment  
variables to your environment.plist to keep them in sync.

By the way, it seems you configured wrongly your .bash_profile: you've  
used /Applications/MAMP/conf instead of /Applications/MAMP/bin.

Hope this helps!

[1] http://www.macosxhints.com/article.php?story=20040715133738459

--
Igor Sutton
igorsutton at me.com




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2417 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20090515/6c3df99b/attachment.p7s>


More information about the textmate mailing list