0

I installed Visual Code Studio w/ESLint. It won't operate because it is reporting "Language server needs at least PHP 7 installed. Version found: 5.5.38". After researching, I discovered that it seems to be looking at the pre-installed MAC OSX php version. I downloaded and ran PHP 7.1 onto the Mac, changed the PATH variables in ~/.profile, as recommended. I made sure that the LoadModule php5_module ... line in /etc/apache2/httpd.conf was commented out, and restarted (reboot of machine). When I do: > php -v it yields the new version (7.1), but the error report from VSC is the same. What am I missing?

1
  • The provided solution was easy and effective. Much appreciated. Commented Dec 15, 2017 at 13:44

1 Answer 1

2

I'm not necessarily sure what you're missing, but I'd use Homebrew, then once installed type the following into terminal to install php 7.1

brew install homebrew/php/php71

You can use the following to switch between versions:

brew unlink php71

And then to link (and vice versa):

brew link php55

To get the version of the PHP that is currently in PATH, type

php --version

Trust me, I've been doing LAMP development for seven years and it's a pain to not use Homebrew if you're using a Mac. I've also used VS Code before I started using PHP Storm, and this method worked for me.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.