phpseclib直到今天早上都可以正常工作-没有找到目录

时间:2018-07-10 11:58:38

标签: php phpseclib

我的phpseclib-1.0昨天工作正常,但是突然我的脚本正在标记该错误;

PHP Warning:  include_once(Math/BigInteger.php): failed to open stream: No such file or directory in /home/Net/SSH2.php on line 943
PHP Warning:  include_once(): Failed opening 'Math/BigInteger.php' for inclusion (include_path='.:/usr/share/php') in /home/Net/SSH2.php on line 943
PHP Warning:  include_once(Crypt/Random.php): failed to open stream: No such file or directory in /home/Net/SSH2.php on line 947
PHP Warning:  include_once(): Failed opening 'Crypt/Random.php' for inclusion (include_path='.:/usr/share/php') in /home/Net/SSH2.php on line 947
PHP Warning:  include_once(Crypt/Hash.php): failed to open stream: No such file or directory in /home/Net/SSH2.php on line 951
PHP Warning:  include_once(): Failed opening 'Crypt/Hash.php' for inclusion (include_path='.:/usr/share/php') in /home/Net/SSH2.php on line 951
PHP Warning:  include_once(Crypt/Base.php): failed to open stream: No such file or directory in /home/Net/SSH2.php on line 956
PHP Warning:  include_once(): Failed opening 'Crypt/Base.php' for inclusion (include_path='.:/usr/share/php') in /home/Net/SSH2.php on line 956
PHP Fatal error:  Uncaught Error: Call to undefined function phpseclib_resolve_include_path() in /home/Net/SSH2.php:1363

自上次完美运行以来,我一直没有更改脚本……这怎么可能?

编辑:我认为这是问题所在,所以更改了Net / SSH2.php主文件中的文件路径,现在我收到此错误;

PHP Notice:  No compatible server to client encryption algorithms found in /home/Net/SSH2.php on line 1561

谢谢

1 个答案:

答案 0 :(得分:0)

似乎您正在使用phpseclib 1.0而不是2.0。 phpseclib 2.0依靠自动加载来完成很多工作。

要使phpseclib 1.0正常工作,您可能需要设置include_path:

set_include_path(get_include_path() . PATH_SEPARATOR . 'libraries/phpseclib');

libraries/phpseclib需要根据您安装phpseclib的位置进行调整。

此外,撤消对包含项所做的所有更改。 idk您进行了哪些更改,但可能会破坏您可能做的任何include_path事情。