Sandra Willford
Sandra Willford

Reputation: 3789

php configuration: PHP executable not found

I am trying to setup php in VSCode. I don't want it in my global settings, so in the workspace settings I have:

{
    "folders": [
        {
            "path": "."
        }
    ],
    "settings": {
        "php.validate.enable": true,
        "php.validate.executablePath": "C:\\php\\php.exe",
        "php.validate.run": "onType"
    }
}

I downloaded PHP to c:\php...

enter image description here

But am still getting this error when I fire up the workspce:

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

Upvotes: 1

Views: 3735

Answers (1)

LukeFilewalker
LukeFilewalker

Reputation: 752

You also need to set php.executablePath inside the settings.json, so that everything works as it should.

To find the settings.json file go to;

File -> Preferences -> User Settings -> Settings.json

And in this, make sure the following are set;

"php.executablePath": "C:\\php\\php.exe",
"php.validate.executablePath": "C:\\php\\php.exe"

Upvotes: 7

Related Questions