zobo / php-language-server

PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥
ISC License
56 stars 12 forks source link

Error spawning PHP: Command failed with exit code 1: C://xampp//phpClass/php.exe --version The system cannot find the path specified. #79

Open Denilson15 opened 3 months ago

Denilson15 commented 3 months ago

Using VS Code and it doesn't let me use PHP for my class, ive already set up the Path on control panel and its not working. How do I fix this, im new to programming.

zobo commented 3 months ago

The vscode extension vscode-php-intellisense is looking for your php.exe so it can run the language services. It tries to look for it in the following config keys - first wins:

If you are on windows, find where your php.exe is installed and try to configure php.executablePath with the proper value. The current value is probably C://xampp//phpClass/php.exe. If the path is correct the value should be C:\xampp\phpClass\php.exe or maybe C:\\xampp\\phpClass\\php.exe depending on the context you are editing it in.