PHP executable not found. Install PHP 7 and add it to your PATH or set the php.executablePath setting

Nifal Nizar picture Nifal Nizar · Oct 27, 2016 · Viewed 107.8k times · Source

I'm running windows 10 fresh copy and I just installed visual studio code. I was trying to develop a PHP project using VS Code. But I'm having trouble in setting up the environment.

I saw a blog post and I downloaded the binary file of PHP 7 and place it in the "C" drive. Then I set path variable too.

But still, I'm getting this issue.

enter image description here

Answer

ops picture ops · Dec 16, 2016

You installed PHP IntelliSense extension, and this error because of it.
So if you want to fix this problem go to this menu:
File -> Preferences -> Settings
Now you can see 2 window. In the right window add below codes:

{
    "php.validate.executablePath": "C:\\wamp64\\bin\\php\\php7.0.4\\php.exe",
    "php.executablePath": "C:\\wamp64\\bin\\php\\php7.0.4\\php.exe"
}

Just like below image.

enter image description here

NOTICE: This address C:\\wamp64\\bin\\php\\php7.0.4\\php.exe is my php7.exe file address. Replace this address with own php7.exe.