How to set php executable php.validate.executablePath path in vscode when php is installed inside Docker container?

I have a docker based development environment.

Every time I open VSCode, I get this message:

Cannot be verified because the PHP executable is not installed. Use the 'php.validate.executablePath' setting to configure the PHP executable.

Does anyone know how to set php.validate.executablePath in this case?

I have no idea how to do this.

+14
source share
7 answers

Here is a screenshot.

  • Do not forget to run away \
  • You do not need to add it to the path

set php.validate.executablePath snapshot

+10

, . .

"" > "" > ""... settings.json.

:

{ "php.validate.executablePath": " PHP.exe" }

, PHP.exe , php > bin.

, .

+5

, .

Windows:

  1. ""
  2. " "
  3. php 7:

enter image description here

+5

Linux: PHP, ,

$ whereis php

php ( /usr/bin/php usr/local/bin/php), .

VScode settings.json

php.validate.executablePath: /usr/bin/php

+4

PHP, : http://windows.php.net/download/

:

"php.validate.executablePath": "C:/php/php.exe"

0

. php.exe .

, "php.validate.executablePath": "c:/path/to/php7.2.10/php.exe" settings.json VSCode.

0

"php.validate.executablePath": "C:/php/php.exe" will not work due to escape from mishandling

try it;

"php.validate.executablePath": "C:\\php\\php.exe"
0
source

Source: https://habr.com/ru/post/1016966/


All Articles