Danoctum
Danoctum

Reputation: 341

MacOS Sierra PHP installation with Homebrew not able to use homebrew php

I recently got my hands on a new macbook and I'm loving the terminal! I'm now configuring my enviroment to run completely on homebrew and on different php versions. To do this, I am following this guide: https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions

Everything works up to the point of

brew unlink [email protected] && brew link --force --overwrite [email protected]

When I do this I get no error message and everything is OK, however, the guide says that I have to check with php -v to see which version is running and it is NOT php 5.6...

PHP 7.1.16 (cli) (built: Apr  1 2018 13:14:42) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

Is the message I get back.

When I run which php:

/usr/local/bin/php

What I have tried

Restarting apache

removing everything regarding php from /usr/local/php-*

checking brew, both php 5.6 and apache are running

Could anyone help me? Thank you for your time!

EDIT (FIXED): Restarted my Mac and then the brew PHP installation went trough ^^

Upvotes: 0

Views: 703

Answers (1)

Damian Dziaduch
Damian Dziaduch

Reputation: 2127

You just need to open new shell tab / window. You don't have to restart macOS :)

Upvotes: 1

Related Questions