gpt4 book ai didi

php - laravel ssh - 预期的 SSH_FXP_VERSION

转载 作者:行者123 更新时间:2023-12-05 07:57:32 25 4
gpt4 key购买 nike

我正在使用 laravel 任务函数使用 phantomjs 运行一些代码,然后使用输出。代码是使用 artisan 命令执行的。

这是我使用的部分代码:

private static function phantomjs($file, $c, $a)
{
SSH::run(array("phantomjs " . base_path("phantomjs/" . $file)), function($line)
{
$json = json_decode($line);
DataHelper::saveJson($json);
}
}

每当我运行命令时,这段代码都会出现以下错误:

[ErrorException]
Expected SSH_FXP_VERSION

如果我自己输出命令并在终端中运行它,它就可以正常工作。

有谁知道我是否需要更改一些配置或者我的代码是否不正确?我已经能够通过 ssh 执行 nodejs 脚本。

我在我的服务器上使用 Debian 7.6。

感谢您的帮助。 :)

最佳答案

对我来说,这是 sftp-server 路径的问题,而不是我使用的/usr/lib/openssh/sftp-server/usr/libexec/openssh/sftp-server

关于php - laravel ssh - 预期的 SSH_FXP_VERSION,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26886519/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com