-1

Recently I updated the default PHP version on MacOS X 10.11 to the newer 7.1.4, but when I do php -v on the terminal it says this: PHP 5.5.38 (cli) (built: Aug 21 2016 21:48:49).

I created the phpinfo on the web root and it says that the version is actually the 7.1.4.

What should I do to resolve this issue? Is this a real issue?

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • "Recently I updated the default PHP version on MacOS X 10.11 to the newer 7.1.4," — How? – Quentin Sep 27 '17 at 22:55
  • 1
    "when I do php -v on terminal it says this: PHP 5.5.38" — So you didn't update the command line version of PHP – Quentin Sep 27 '17 at 22:55
  • "I created the phpinfo on the web root and it says that the version is actually the 7.1.4" — but you did upgrade the Apache module – Quentin Sep 27 '17 at 22:55
  • "Is this a really issue?" — Is it causing you problems? – Quentin Sep 27 '17 at 22:56
  • @Quentin I used the command curl -s http://php-osx.liip.ch/install.sh | bash -s 7.1 – LeoElicker Sep 27 '17 at 23:00
  • "So you didn't update the command line version of PHP" how am I supposed to do that? I'm not a experienced OS X user. – LeoElicker Sep 27 '17 at 23:01
  • Possible duplicate of [what is PATH on the MAC (UNIX) system](https://stackoverflow.com/q/18409707/1255289) – miken32 Sep 27 '17 at 23:17

1 Answers1

1

Since you said:

I used the command curl -s php-osx.liip.ch/install.sh | bash -s 7.1

I took a look at https://php-osx.liip.ch, which says:

Why does php -v on the command line still show my old version?

php-osx doesn't overwrite the php binaries installed by Apple, but installs everything in /usr/local/php5. The new php binary is therefore in /usr/local/php5/bin/php.

You can also adjust your PATH do include that directory, eg. write into your ~/.profile file the following

export PATH=/usr/local/php5/bin:$PATH
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335