Answer the question
In order to leave comments, you need to log in
How to set correct path in VSCode phpvalidateexecutablePath?
Hello, I am facing the following situation. I'm learning PHP (7.1), writing in Visual Studio Code and using OpenServer, until recently I didn't feel the need for debugging and terminal, ignoring them. Now I started working with Composer, libraries and frameworks, so the need for a terminal and debugging appeared. I installed the PHP Debug extension, Xdebug seems to be the same (Then it turned out that it was already preinstalled in OpenServer). I fixed everything that is required in php.ini and settings.json, but VSC keeps saying: "Cannot check because C:\Users\username\Program Files (x86)\OpenServer\modules\php\PHP_7. 1\php.exe is not a valid PHP executable Use the php.validate.executablePath option to customize the PHP executable." I fight without exaggeration the third day. The line itself in settings.
"php.validate.executablePath": "C:\\Users\\имяюзера\\Program Files (x86)\\OpenServer\\modules\\php\\PHP_7.1\\php.exe"
"python.pythonPath": "C:\\Users\\имяюзера\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe"
- and no one swears, everything works. I would be very grateful for the help, because I did not find any working recommendations for myself. Answer the question
In order to leave comments, you need to log in
Try adding the path to your php file to PATH, and I added both for the user and globally. Run the terminal anywhere and execute php -v
And yet, if I remember correctly for OpenServer, it does not recommend editing the php.ini files that are located next to the php executable file, because he can change them and your settings will fail.
the rest should work fine
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question