3

For a number of reasons (laziness among them), I have a few different versions of php installed on my computer. If I do php -v in my Windows Console, it shows the version of php I'd expect. However, if I do php -v in my Cygwin terminal, I get a different version.

How can I tell Cygwin to use the version I want it to? Currently PATH is pointed to the correct version.

Thank you very much.

spuppett
  • 547
  • 10
  • 26

1 Answers1

0

What path did you set for PHP in .bashrc for cygwin? Did you remember that your Windows C drive is mounted to /cygdrive/c/:

export PATH=$PATH:/cygdrive/c/xampp/php and not export PATH=$PATH:\xampp\php

Egg
  • 1,782
  • 1
  • 12
  • 28
  • if I `printenv PATH`, it shows as `/cygdrive/c/PHP`, which is the path that my windows console is looking in for the 'correct' one. – spuppett Apr 14 '16 at 17:29
  • 1
    I didn't even think about adding an alias to PHP, I assumed that bash would read the path first and look along that path for php. I added an alias to point the one I wanted, and now that seems to work. I guess my question may have changed to, 'Why isn't cygwin looking along the PATH for the PHP executable?' – spuppett Apr 14 '16 at 17:39