简体   繁体   中英

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

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM