UID1
性别保密
注册时间2013-7-10
最后登录1970-1-1
回帖0
在线时间 小时
精华
SB
威望
随币
成长值: 50590
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
Discuz后台登陆超时卡死或504错误等问题解决方法
解决 Discuz!X3.4以下版本前台打开卡慢、后台登陆卡死或504错误等问题
discuz的新版本检测和补丁功能已经关闭,导致后台调用相关链接时超时,引起后台打不开
X3.4已经移除相关代码,没有此问题,建议升级
Comsenz 核心产品 Discuz! X3.4 正式版【2017-08-01】
http://www.discuz.net/thread-3825961-1-1.html
(出处: Discuz! 官方站)
X3.4以下的版本解决办法
后台
打开:source/admincp/admincp_main.php
删除(大概在37-60行)
- 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);
- }
复制代码
前台也有影响管理员打开速度的
下载替换文件 source\module\misc\misc_patch.php
misc_patch.zip
(770 Bytes, 下载次数: 1300)
也就是只保留IP异常提醒的代码,用不到也可以删了
或直接复制下面代码替换misc_patch.php里的类容
- <?php
- /**
- * [Discuz!] (C)2001-2099 Comsenz Inc.
- * This is NOT a freeware, use is subject to license terms
- *
- * $Id: misc_patch.php 33690 2013-08-02 09:07:22Z nemohou $
- */
- if(!defined('IN_DISCUZ')) {
- exit('Access Denied');
- }
- if($_GET['action'] == 'checkpatch') {
- header('Content-Type: text/javascript');
- exit;
- } elseif($_GET['action'] == 'patchnotice') {
- include template('common/header_ajax');
- include template('common/footer_ajax');
- exit;
- } elseif($_GET['action'] == 'pluginnotice') {
- include template('common/header_ajax');
- include template('common/footer_ajax');
- exit;
- } elseif($_GET['action'] == 'ipnotice') {
- require_once libfile('function/misc');
- include template('common/header_ajax');
- if($_G['cookie']['lip'] && $_G['cookie']['lip'] != ',' && $_G['uid'] && $_G['setting']['disableipnotice'] != 1) {
- $status = C::t('common_member_status')->fetch($_G['uid']);
- $lip = explode(',', $_G['cookie']['lip']);
- $lastipConvert = convertip($lip[0]);
- $lastipDate = dgmdate($lip[1]);
- $nowipConvert = convertip($status['lastip']);
- $lastipConvert = process_ipnotice($lastipConvert);
- $nowipConvert = process_ipnotice($nowipConvert);
- if($lastipConvert != $nowipConvert && stripos($lastipConvert, $nowipConvert) == false && stripos($nowipConvert, $lastipConvert) == false) {
- $lang = lang('forum/misc');
- include template('common/ipnotice');
- }
- }
- include template('common/footer_ajax');
- exit;
- }
- ?>
复制代码
本帖转载自:http://www.discuz.net/thread-3827167-1-1.html
|
|