1

I just recently switched over to iTerm instead of the default Mac terminal. Everything works well except php. For some reason, even though both iTerm and Terminal are using the same zsh shell, iTerm does not recognize the Homebrew php. (See image) I can't figure out how to change that for iTerm, or maybe there's a bigger picture here I don't understand.

enter image description here

1 Answer 1

0

Attached image Notice that in your image, you have different installations of the php engine. On the iTerm terminal, instead of just php, try doing /usr/local/bin/php. That should return the php installation that has the homebrew php on it.

4
  • Right. I'm with you. I just don't understand why it's different for iTerm. Why would terminal show one and iTerm show another? Any ideas how I got here?
    – xpersonas
    Jan 30, 2019 at 17:33
  • I'm not sure, but I think you can add alias php='/usr/local/bin/php' into your .bashrc. (see here and here for more info.) Jan 30, 2019 at 17:45
  • Appreciate the responses. I don't know if a full restart fixed it or what, but both iTerm and Terminal are working as expected now. I don't know if something was cached on the system or what.
    – xpersonas
    Jan 31, 2019 at 22:33
  • So php is working normally now? Feb 1, 2019 at 13:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .