我正在使用https://github.com/phpseclib/phpseclib在 Debian 服务器上执行 cmd。
echo $ssh->exec("ls");
对我来说工作正常 - 但如果我尝试以下操作(如这里),则会出现超时:
$ssh->write("ls -la\n");
echo $ssh->read();
错误日志说:
[warn] mod_fcgid: read data timeout in 10 seconds
[error] Premature end of script headers: index.php
我还尝试增加 fcgid 设置(最多 300 秒):
FcgidBusyTimeout 10
FcgidIOTimeout 10
不起作用...有什么帮助吗?
谢谢!