Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to setting php.validate.executablePath? #533

Closed
karl20888 opened this issue Nov 24, 2015 · 26 comments
Closed

How to setting php.validate.executablePath? #533

karl20888 opened this issue Nov 24, 2015 · 26 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@karl20888
Copy link

How to setting php.validate.executablePath?

@dbaeumer dbaeumer self-assigned this Nov 24, 2015
@dbaeumer
Copy link
Member

If the php executable is not on your path you can use the setting to point to the php executable. For example

php.validate.executablePath="C:\\apps\\php\\php.exe"

@karl20888
Copy link
Author

@dbaeumer Thank you!

@Shirish-FrontEndDev
Copy link

Not Working
untitled

@Shirish-FrontEndDev
Copy link

I am sorry the file ext was wrong

@dbaeumer dbaeumer added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Dec 11, 2015
@mattid89
Copy link

What another settings do I need to debug php code?

@dbaeumer
Copy link
Member

There is currently no out of the box support to debug PHP. You might want to look if an extension is available.

@mattid89
Copy link

thanks!

@Hettar
Copy link

Hettar commented Oct 13, 2016

Try that:
php.validate.executablePath="C:/apps/php/php.exe"

@TRE8
Copy link

TRE8 commented Nov 30, 2016

How would I achieve this on my Mac running Mamp?

I'm trying
"php.validate.executablePath": "~/Applications/MAMP/bin/php/php7.0.12/bin"

@Exevium
Copy link

Exevium commented Mar 15, 2017

code error

It doesn't work for me.

@dastani
Copy link

dastani commented May 2, 2017

hi,
open file setting.json
{
"php.validate.executablePath": "C:\xampp\php\php.exe",
"php.executablePath": "C:\php7.1\php.exe"
}
:)

@cp1001
Copy link

cp1001 commented May 10, 2017

on mac,add setting to setton.json:
"php.validate.executablePath": "/usr/local/php5-7.1.4-20170506-100436/bin/php"

@muganwas
Copy link

@only1shirish super helpful, I couldn't make sense of anything anyone was saying.

@Nathan-Hanlon
Copy link

Nathan-Hanlon commented Jul 5, 2017

I have tried everything on here but it is still not debugging or running or doing anything really

@dbaeumer
Copy link
Member

dbaeumer commented Jul 6, 2017

@Nathan-Hanlon which OS are you on?

@Nathan-Hanlon
Copy link

Nathan-Hanlon commented Jul 6, 2017 via email

@8sam
Copy link

8sam commented Jul 27, 2017

I went to my workspace settings and typed php.validate.executablePath: "c://Users/User01/data/php.exe" but its not working even then.

@knucklejames
Copy link

I've tried a few paths for PHP binaries on OS X, none of them seem to work. Visual Studio is finding PHP 5.6 somewhere on my computer and it's sticking to it, regardless of my settings.

The error I get is "The language server needs at least PHP 7 installed. Version found: 5.6.30".

Here are the different paths I've tried to give it:

"php.validate.executablePath": "/Applications/MAMP/bin/php/php7.1.1/bin/php",
"php.validate.executablePath": "/Applications/MAMP/bin/php/php7.1.1/bin/",
"php.validate.executablePath": "/usr/local/Cellar/php71/7.1.0_11/bin/",
"php.validate.executablePath": "/usr/local/Cellar/php71/7.1.0_11/bin/php",

Atom uses MAMP's php binary just fine. Visual Studio Code ain't having it. ¯_(ツ)_/¯

screen shot 2017-08-04 at 2 53 21 pm

@icwgiam
Copy link

icwgiam commented Aug 28, 2017

is not working for me ... sorry !!!

@iamkingsleyf
Copy link

trying to set mine

@iamkingsleyf
Copy link

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

Still having

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

@ejljustimbaste
Copy link

ejljustimbaste commented Sep 6, 2017

Guys, just find the directory of the file where you can find your php.exe

Mine was "C:\xampp\php\php.exe"

I just had to change "\" to "/"

Therefore "C:/xampp/php/php.exe"

@atex99
Copy link

atex99 commented Sep 8, 2017

@ejljustimbaste It still doesn't work.

@iamkingsleyf
Copy link

you have to set for php.executablePath and php.validate.executablePath

@gerardactu
Copy link

solve
Do this to solve 100% work

@arifavia
Copy link

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

I added these and it worked, finally!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests