Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VsCode php.validate.executablePath, after insalled XAMPP

i'm trying to set the certain path for the php extension in my vscode (using linux)

i started installing the XAMPP and after it..i tried to use the extension writing some php scripts(php extension INTELLISENSE and DEBUG), but the extension is not working properly and it's showing that error:

Cannot validate since /usr/bin/php is not a valid php executable. Use the setting 'php.validate.executablePath' to configure the PHP executable.

i tried to set it using que path which is provided by vscode documentation, but it's still no working.

Can anyone help me !! please!!!

like image 866
Reinaldo Duguet Avatar asked Oct 24 '25 11:10

Reinaldo Duguet


2 Answers

Php path in windows

Typing in terminal

where php

And it'll gives the path as (in my case)

C:\xampp\php\php.exe

like image 79
AamirSohailKmAs Avatar answered Oct 26 '25 00:10

AamirSohailKmAs


I found a solution, typing in terminal

'whereis php'

that returns the absolute path for set it in the vscode extension

/opt/lampp/bin/php

Then, setting the path in the follow line

php.validate.executablePath: "/opt/lampp/bin/php",

So, I hope this solution is helping someone behind the screen.

like image 22
Reinaldo Duguet Avatar answered Oct 26 '25 00:10

Reinaldo Duguet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!