user6401887
user6401887

Reputation:

VS code can't access PHP 7.1 on OSX Sierra

Hi I am using the latest version of VS code on OSX Sierra. My settings.json are:

// Place your settings in this file to overwrite the default settings
{
   "php.validate.executablePath": "/usr/local/php5-7.1.0-20161202-092124/bin/php"
}

The errors I get are:

Error parsing PHP version. Please check the output of php --version

and

spawn EACCES

Upvotes: 2

Views: 1989

Answers (1)

I have this problem on linux i fixed changing the file path on VSCode settings from

"php.validate.executablePath": "/usr/local/ampps/php-7.1/",

To

"php.validate.executablePath": "/usr/local/ampps/php-7.1/bin/php",

And some cases will need add the php folder to current user permissions using command chown username -R path/to/php/ or using chmod 777 -R path/to/php/

Upvotes: 4

Related Questions