Resolved: cannot validate since no php executable is set xampp

Here is the simple solution for the Xampp user. The error occur due to the non availability of the file extension in the VS Studio code application. Unfortunately, you have to set this manually.

Given solution is for windows users. However, it works fine for mac users as well. Some screenshot may be different for the mac users, so do not get confuse. Settings are the same for both mac and windows users.

Follow this simple steps to fix this problem.

Click on the “Open Setting” tab display on the popup message box.

Once clicked, it will take you to the another page.

Next click on the link “Edit in settings.json

Now you are in the code editor. You have to mention the php path extension here.

Step 1:

Copy below code and past it in the curly bracket.

“php.validate.executablePath”: “D:\xampp\php\php.exe”,

Look how I added the given path. Remember to change your drive name. In my case I added D:\xampp\php . If you have installed the xampp in the C drive. Find the exact path of your xampp file by going to the xampp folder and mention the correct path.

Additionally, If in case “php.exe” file doesn’t exit in your php folder then create one blank php.exe file.

Step 2:

In step two, you have to add the path in your computer setting as well. To do that. Simply search for the word “environment” in your windows search bar located on the left hand side (Bottom) of the window.

You will see setting options “Edit the system environment variables”.

Click to the setting. It will open the system properties box.

Now click to “Environment Variables” tab given at the bottom.

In the next window select path and click edit.

In the edit environment variable window, you have to mention the path. If the path is already exit, then you do not need to add it again. If not, then add new path similar to this.

Once you added the correct path. Click ok in all the open windows.

Close the VS Studio code if it is open and restart it again.

Your issue may have resolved.

Let us know if you are still having trouble in the comment box.

Related Posts

Leave a Reply