I'm trying to learn PHP and am encountering some issues early on. When I setup my basic file, then select PHP serve project, I receive a message at the bottom right of the screen saying PHP not found. I've setup my settings for the default xampp php file folder location with the command: "php.validate.executablePath": "c:\xampp\php\php.exe",
Pics are attached. Any help would be really appreciated.
JSON Settings

Go to the PHP Server extension setting. There you have to add the path for:
PHP Config Path: C:\xampp\php\php.ini
PHP Path: C:\xampp\php\php.exe
[Make sure to add your installed folder, if you have installed xampp in another drive, you need to give that specific location.]
My settings:

Go to File->Preferences->settings->User settings tab->extensions->from the drop down select php->on the right pane under PHP › Validate: Executable Path select edit in settings.json.
Then set the path as your case may be for a XAMPP user who installed XAMPP on c drive you will have:
"php.validate.executablePath": "c:\\xampp\\php\\php.exe"
If PHP is installed in your system independently or by other means simply set the path of your php.exe file like below:
"php.validate.executablePath": "C://path.to.your.php.folder//php.exe"
Found this solution from php not found visual studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With