discuz! X3.2(DZ3.2)后台突然登录慢的解决
最近几日DZ后台突然出现登录巨慢的情况 ,开始一直以为是登录逻辑哪里出了问题导致,折腾许久并未发现问题,后来发现登录进去后不管在哪个操作界面一刷新主界面就出现慢的情况,这样基本确定问题应该在框架界面上,于是跟了一下框架页的逻辑,最终发现问题出在升级检查这一步,原来官司方的升级检查地址(http://upgrade.discuz.com/DiscuzX/)已经不能访问了。于是索性屏蔽了检测更新的代码,登录终于恢复正常了。修改如下:修改文件source/admincp/admincp_main.php,注释掉 大约36-59行的代码即可if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && ($_G['setting']['showpatchnotice'] == 1 || !isset($_G['cookie']['checkpatch']))) {
$discuz_patch = new discuz_patch();
if($_G['setting']['showpatchnotice'] == 1) {
$notice = $discuz_patch->fetch_patch_notice();
if($notice['data']) {
$shownotice = '<div class="notice"><a href="'.$basescript.'?action=patch" id="notice">'.($notice['fixed'] ? $lang['patch_fix_complete'] : $lang['patch_fix_rigth_now']).'</a></div>';
}
}
if(!isset($_G['cookie']['checkpatch'])) {
$discuz_patch->check_patch();
}
}
if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && !$shownotice && $_G['setting']['upgrade']) {
$shownotice = '<div class="notice"><a href="'.$basescript.'?action=upgrade" id="notice">'.$lang['upgrade_right_now'].'</a></div>';
}
if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && !isset($_G['cookie']['checkupgrade'])) {
$discuz_upgrade = new discuz_upgrade();
if($discuz_upgrade->check_upgrade()) {
if(empty($shownotice)) {
$shownotice = '<div class="notice"><a href="'.$basescript.'?action=upgrade" id="notice">'.$lang['upgrade_right_now'].'</a></div>';
}
}
dsetcookie('checkupgrade', 1, 7200);
}受影响的版本应该在discuz! X3.2(DZ3.2)及以下的版本,因为3.3及以上已经取消掉这个升级检查了,已经不再受支持,可能也正是这个原因官方已经停掉要以上版本更新检查地址,很有可能是长期关闭了,要继续使用3.2的同学就需要做下改动,以免登录老是慢得揪心。 希望能帮到有同样问题的同学。
页:
[1]