|
最近把论坛换到了新的服务器上,顺便升级到discuz x3.2最新版本。ucenter和uc_server后台就无法登录了。$ W4 V! a3 S& w2 g; U3 n
开始以为是密码错误,上传tools工具修改密码之后还是不行,其实根本不是密码不对,就是最新版本的discuz出现的BUG导致我们无法登录。* c1 S6 D0 F* Y$ c
+ Y+ n$ H @, _/ p1 W5 {8 z
. G- M7 \' V1 f: T9 }解决办法很简单
' ], c! @% q* {6 Z! U在/uc_server/model 中找到admin.php; e# n- `5 C' j2 ]7 }6 {& L
! q& `' _/ H% n7 S4 O) J3 c
$ L X( v# j2 _; N2 e找到代码function adminbase() {
$ h. o0 Q% _2 D6 y$ t! D parent::__construct();( F0 P6 g6 J- P3 E+ H
$this->cookie_status = 0;
% a$ H* \ Z3 ^% s8 Q* Z7 P; A& A $sid = $this->cookie_status ? getgpc('sid', 'C') :rawurlencode(getgpc('sid', 'R'));
) F2 L0 M5 ~- ^2 v $this->sid = $this->view->sid = $this->sid_decode($sid) ? $sid : '';* r( x' V. }& `3 o* c
2 U8 h7 \# r' y
% ]& S" ?! {& k/ V% ^6 r6 A
; k2 J# B n2 a将红色部分修改4 u- v' c* m, A
function adminbase() {
$ k* E9 R" z8 q- t/ ~% K" t) K parent::__construct();
) d0 P# z: b4 \7 M $this->cookie_status = isset($_COOKIE['sid']) ? 1 : 0;
$ Q) j4 D" A. p1 V5 e3 E4 } $sid = $this->cookie_status ? getgpc('sid', 'C') :rawurlencode(getgpc('sid', 'R'));) k d1 B3 _+ z0 ?! L
$this->sid = $this->view->sid = $this->sid_decode($sid) ? $sid : '';
9 I- B2 x/ J( e4 k7 z" l6 L3 H问题解决。, ]* s8 _+ K5 v5 I% w6 O# U
|
|