查看: 1835|回复: 0

[Mysql数据库] phpmyadmin登录报错crypt_random_string requires at least one symmetric cipher be load

发表于 2018-1-9 08:00:00

通过phpmyadmin登陆时提示以下错误:

phpmyadmin crypt_random_string requires at least one symmetric cipher be loaded

报错原因:路径问题。

解决办法:

1、进入到phpmyadmin根目录下,打开\libraries\phpseclib\Crypt\Random.php。

2、大概在195行,找到下面代码并把红色背景字体添加进去。

  1. switch (true) {
  2. case phpseclib_resolve_include_path('libraries/phpseclib/Crypt/AES.php’):
  3. if (!class_exists('Crypt_AES’)) {
  4. include_once 'AES.php’;
  5. }
  6. $crypto = new Crypt_AES(CRYPT_AES_MODE_CTR);
  7. break;
  8. case phpseclib_resolve_include_path('libraries/phpseclib/Crypt/Twofish.php’):
  9. if (!class_exists('Crypt_Twofish’)) {
  10. include_once 'Twofish.php’;
  11. }
  12. $crypto = new Crypt_Twofish(CRYPT_TWOFISH_MODE_CTR);
  13. break;
  14. case phpseclib_resolve_include_path('libraries/phpseclib/Crypt/Blowfish.php’):
  15. if (!class_exists('Crypt_Blowfish’)) {
  16. include_once 'Blowfish.php’;
  17. }
  18. $crypto = new Crypt_Blowfish(CRYPT_BLOWFISH_MODE_CTR);
  19. break;
  20. case phpseclib_resolve_include_path('libraries/phpseclib/Crypt/TripleDES.php’):
  21. if (!class_exists('Crypt_TripleDES’)) {
  22. include_once 'TripleDES.php’;
  23. }
  24. $crypto = new Crypt_TripleDES(CRYPT_DES_MODE_CTR);
  25. break;
  26. case phpseclib_resolve_include_path('libraries/phpseclib/Crypt/DES.php’):
  27. if (!class_exists('Crypt_DES’)) {
  28. include_once 'DES.php’;
  29. }
  30. $crypto = new Crypt_DES(CRYPT_DES_MODE_CTR);
  31. break;
  32. case phpseclib_resolve_include_path('libraries/phpseclib/Crypt/RC4.php’):
  33. if (!class_exists('Crypt_RC4’)) {
  34. include_once 'RC4.php’;
  35. }
  36. $crypto = new Crypt_RC4();
  37. break;
  38. default:
  39. user_error('crypt_random_string requires at least one symmetric cipher be loaded’);
  40. return false;
  41. }
复制代码



回复

使用道具 举报