vscode-php-intellisense icon indicating copy to clipboard operation
vscode-php-intellisense copied to clipboard

This extention does not work over Remote SSH

Open Eforen opened this issue 5 years ago • 5 comments

This plugin does not work over VSCode-Remote SSH. If it was a set static port or had a config to set the port number of the language server I could forward the port.

The fact that the language server is launched as a random port makes it impossible for me to forward the port over tunnel.

Eforen avatar Oct 27 '20 16:10 Eforen

It should work. I don't believe the port the server runs on needs to be available to your local VSCode.

I have it running over an ssh connection, with PHP at the remote end running in a docker container. No port forwarding is involved.

judgej avatar Jan 02 '21 19:01 judgej

@judgej Even though the extension is working locally (MacOS) on a different workspace, I am not able to make it work on my SSH host (Linux).

So far, my remote settings.json (~/.vscode-server/data/Machine/settings.json) has the following pertinent entries:

{
    ...
    "php.executablePath": "/usr/bin/php",
    "remote.extensionKind": {
        "felixfbecker.php-intellisense": [ "workspace" ],
      },
    ...
}

And I got the following exception:

UnexpectedValueException: RecursiveDirectoryIterator::__construct(~/somefilepath.tmp): failed to open dir: Permission denied in ~/.vscode-server/extensions/felixfbecker.php-intellisense-2.3.14/vendor/webmozart/glob/src/Iterator/RecursiveDirectoryIterator.php:43

May I ask you your settings.json and permissions setup on the remote file system?

bborrel-topdevz avatar Jan 15 '21 17:01 bborrel-topdevz

I tried excluding those .tmp files (via files.exclude), without success, and ended up modifying file permissions.

bborrel-topdevz avatar Jan 15 '21 18:01 bborrel-topdevz

The permissions can get messed up if you are using containers on the remote server to run PHP, since the container may be accessing the source volume as a different user. Opening up the permissions like you have should fix this, bit may be storing up similar problems for later.

judgej avatar Jan 15 '21 20:01 judgej

+1

codeunifier avatar May 11 '21 23:05 codeunifier