0

friends! I'm getting this error (see title) after the attempt to install PHP IntelliSense v2.3.10 for VS Code editor v1.37.1. I don't have PHP installed. I use the Open Server v5.3.0 Ultimate with activated PHP7.1-x64 support.

This here does not look exactly like my case. PHP executable not found. Install PHP 7 and add it to your PATH or set the php.executablePath setting

And I cannot see the window where to put in the 2 lines mentioned in the PHP executable not found. Install PHP 7 and add it to your PATH or set the php.executablePath setting.

Please tell me what to do.

Mikhail
  • 49
  • 2
  • 10

1 Answers1

2

It's easy to fix. First you need to find where your php executable file is located, it's called php.exe

For example I'm using laragon : E:/laragon/bin/php/php-7.2.19-Win32-VC15-x64/php.exe

So all what you need is find this location and then go to file=>preferences=>settings and search for settings.json then open it and add this line

"php.validate.executablePath": "your php .exe path" and of course you need to add this line carefuly and respect json format rules

MimoudiX
  • 612
  • 3
  • 16
  • What if I don't have php.exe on my computer? I'm using Open Server as localhost. – Mikhail Sep 13 '19 at 09:06
  • 2
    @Mikhail If you don't have PHP installed then you cannot use this extension. Its [marketplace page](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-intellisense) states: "The language server [...] is implemented purely in PHP". Plus, its strange to develop code in any given language if you don't have the language compiler/interpreter available. – Álvaro González Sep 21 '19 at 07:46