|
|
最近把论坛换到了新的服务器上,顺便升级到discuz x3.2最新版本。ucenter和uc_server后台就无法登录了。" Z, A) D. {: [" {5 W
开始以为是密码错误,上传tools工具修改密码之后还是不行,其实根本不是密码不对,就是最新版本的discuz出现的BUG导致我们无法登录。% z5 ^6 m7 L, @6 h0 h, U
' W# |6 m/ [9 c! n) v
# C3 ~4 P) {% ?7 J# ]9 z: P
解决办法很简单+ ^! s8 n/ Y4 `' N. k2 `
在/uc_server/model 中找到admin.php) g4 O" `% T$ U" S3 _2 h, L
9 T( U! x; x }% u/ }
) |5 @$ B5 j, {' M; b找到代码function adminbase() {" X" x( D9 k$ L+ X6 A) s0 q( Q. S0 |
parent::__construct();9 o( P6 R- ^% m8 @9 C% k* ]
$this->cookie_status = 0;+ ]; u4 ]; E- L; e) A$ K/ Y4 n
$sid = $this->cookie_status ? getgpc('sid', 'C') :rawurlencode(getgpc('sid', 'R'));
4 h2 ^: L' {3 d* S/ Y% V $this->sid = $this->view->sid = $this->sid_decode($sid) ? $sid : '';
( i. m! G# m$ U' q" T7 V
2 W" K2 s% t5 |: p1 h+ O v) h% k5 J2 Y
; b1 `. j; y5 h) ?; |! h9 ]$ ?" N
将红色部分修改
+ c4 k* T% P" A# I7 D& n jfunction adminbase() {
4 s0 D' i9 Q$ ^# X" a0 | parent::__construct();
0 u4 R( E: f" V# p. o $this->cookie_status = isset($_COOKIE['sid']) ? 1 : 0;5 H# E% ?) s; W* {9 b1 G* r
$sid = $this->cookie_status ? getgpc('sid', 'C') :rawurlencode(getgpc('sid', 'R'));( U1 ]1 f. R. b+ ~$ D; L
$this->sid = $this->view->sid = $this->sid_decode($sid) ? $sid : '';+ [/ F7 Z* V- S$ I. e
问题解决。
8 U( `) G* b! Z1 A0 h* N8 Q: o |
|