Setting Environment Variables in MAMP?

2019-01-16 19:28发布

I assume that MAMP environment variables can be set in ~/.bash_profile, but it seems that setting them there does not always take effect right away. For instance, I just set a variable in my .bash_profile and have tried restarting MAMP servers, restarting MAMP itself, and even logging out of my computer and nothing seems to work. The variable is still not accessible from within my environment. Is there another way to set MAMP env vars that I'm missing or is there a cache that I need to clear?

Thanks in advance.

标签: php macos mamp
7条回答
我欲成王,谁敢阻挡
2楼-- · 2019-01-16 20:32

I'm assuming you're talking about a local server?

I've noticed, if you look at the processes that apache can have multiple instance running that you might need to check. If they are, quit out of them individually, as the restart won't take the new changes until all instances are restarted. Something to try.

查看更多
登录 后发表回答