zobo / php-language-server

PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Couldn't start client PHP Language Server

Antoniojesusv opened this issue · comments

Severals PHP executable path were indicated correctly inside seetings.json file,

"php.executablePath": "/usr/bin/php"
"php.executablePath": "/usr/bin/php8.0"
"php.executablePath": "/usr/bin/php7.4"

The extension throw the following errors.

image

What am I doing wrong?

Thanks.

Hi. Can you get the full error. Please look under Pannel, OUTPUT and select on the right "PHP Language Server" and see if there is any output.

One other thing you can also do, is enable extended logging in vscode for PHP Language Server. Open settings, and search for php-intellisense.trace.server. Set to verbose and restart vscode. Output of all LSP messages should be in the previously specified OUTPUT panel.

The parameter php-intellisense.trace.server was set with value verbose,

image

The problem is related with permissions, the constructor function from RecursiveDirectoryIterator class cannot iterate the /home/antoniojv/Documents/Projects/roisinfrances/data/#innodb_temp directory,

image

This makes sense because data directory is a bind folder to mysql docker container, if I remove the data directory everything seems to work correctly again,

The question is, Is there a way to exclude directories in the settings file like the php-cs-fixer extension does?

"php-cs-fixer.exclude": [
"/vendor//.php",
"/config//
.php",
"/public//.php",
"/bin//
.php"
],

Hi!
This helps a lot, thank you.

First I'll make sure that directory traversal failures don't kill the Language Server. Then I'll see what the best way of ignoring folders would be.

Hopefully I'll get a release out soon.

Fixed in v1.0.8 . Errors from reading folders will not stop indexing.
Will work on exclusions later.