Discuz 基本已经放弃更新了,处于半废弃状态,出现了各种问题;现在由于它的云平台、在线更新等功能废弃,但是代码未清理开始导致用户网站出现各种小问题,近期更是直接导致后台登陆要爆卡5分钟才能登陆,真是QNMDB,
现在提供解决方法:
定位文件:
/source/admincp/admincp_main.php
37行左右,新版本、补丁检测提醒导致后台登陆卡死,注释掉即可,找到类似以下代码:
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);
}
注释掉即可:
// 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);
// }
再登陆后台试试?
1
1
1
1
951909
951909
1
226120
1
1
226120
厉害,解决了。
非常感谢
完美解决,谢谢老大
谢谢,的确有效。@(呵呵)