随着环境系统及PHP版本越来越多,碰到的问题也就越来越多,在帮客户安装默认织梦dedecms5.7 SP2程序后,点击系统基本参数、SQL命令行工具、防采集串混淆空白无效,我们就来解决这一问题。
导致原因:部分linux环境下生成随机bytes错误
解决办法:修改系统文件common.func.php
修改系统文件:common.func.php,路径为: /include/common.func.php
第一步:删除代码
找到代码(大概96-99行):
if (function_exists('openssl_random_pseudo_bytes')) { return openssl_random_pseudo_bytes($length); }
删除!

第二步:增加代码
找到代码(大概66行-69行):
if (empty($length) OR ! ctype_digit((string) $length)) { return FALSE; }
再其下面增加代码:
if (function_exists('openssl_random_pseudo_bytes')) { return openssl_random_pseudo_bytes($length); }
如图所示:

注明:本文为星速云原创版权所有,禁止转载,一经发现将追究版权责任!