php-ssh icon indicating copy to clipboard operation
php-ssh copied to clipboard

PHP Notice: Undefined offset: 1

Open TheRatG opened this issue 9 years ago • 8 comments

PHP Notice: Undefined offset: 1 in /www/symdep.crm.roboforex.com/vendor/herzult/php-ssh/src/Ssh/Exec.php on line 31

TheRatG avatar Jun 09 '15 14:06 TheRatG

What are you trying to achieve with the library? Seems there is an issue with the result's parsing.

https://github.com/Herzult/php-ssh/blob/master/src/Ssh/Exec.php#L31

Herzult avatar Jun 09 '15 15:06 Herzult

Seems there is an issue with the result's parsing. Yes

TheRatG avatar Jun 09 '15 15:06 TheRatG

@TheRatG Can you please provide the content of $output and other info like: Operating System,Type of command,... ?

h4cc avatar Jun 09 '15 17:06 h4cc

We could fix the access to a key before checking exists regardless.

camspiers avatar Jun 10 '15 00:06 camspiers

it will be cool :smile:

TheRatG avatar Jun 10 '15 06:06 TheRatG

Had this same issue, checked what was in $output: empty string.

Adding this fixed the issue for me: https://github.com/Herzult/php-ssh/pull/48

cabloo avatar Jul 14 '15 23:07 cabloo

This particular issue happens to me too when connecting to an appliance which doesn't have a full shell and doesn't have the echo command, therefor it cannot echo the returncode which is expected by the class Exec

syphernl avatar Dec 11 '15 07:12 syphernl

Had the same issue on remote host with fish installed. Is this package working only on POSIX shell?

petrenkorf avatar Feb 27 '18 18:02 petrenkorf