|
|
最近把论坛换到了新的服务器上,顺便升级到discuz x3.2最新版本。ucenter和uc_server后台就无法登录了。# z5 n9 A: Y, a3 P3 c; z: w
开始以为是密码错误,上传tools工具修改密码之后还是不行,其实根本不是密码不对,就是最新版本的discuz出现的BUG导致我们无法登录。2 C. h8 H1 D: s
5 f% T" ^1 n0 F. @7 y9 V
" a2 p0 m) N9 ? t4 z- }3 i s解决办法很简单
6 C6 L4 X, h0 \; M. T在/uc_server/model 中找到admin.php
- S- w# l ~# u" M6 {
$ G: z! N0 L3 d4 `* [ I
! N% J$ d5 o) w; t8 B# r; s找到代码function adminbase() {: M) O, e" G5 w9 T
parent::__construct();1 ?: f8 P* z G, F- ^% Y$ V4 i4 @
$this->cookie_status = 0;
8 u7 r' ^5 w& y6 f $sid = $this->cookie_status ? getgpc('sid', 'C') :rawurlencode(getgpc('sid', 'R'));
6 S* v, V" o& f+ `" a $this->sid = $this->view->sid = $this->sid_decode($sid) ? $sid : '';
" m: t1 Z* @ \% H4 g: @
; r% n- ^/ A& _4 Z. S
' V" P6 p3 w$ R% A. F
% G% i: n9 N! Y: T将红色部分修改
2 D, t" q. H! T% ?: Rfunction adminbase() {
) Q* L4 k2 l$ e2 ^+ J# f parent::__construct();& i2 i+ _0 K9 n, W2 b
$this->cookie_status = isset($_COOKIE['sid']) ? 1 : 0;4 r2 e! U$ o% v1 L; [
$sid = $this->cookie_status ? getgpc('sid', 'C') :rawurlencode(getgpc('sid', 'R'));
j+ b$ f1 \9 ]; ?3 q5 `2 t# o $this->sid = $this->view->sid = $this->sid_decode($sid) ? $sid : '';& }1 v6 E6 g7 Y) H% L2 O) s
问题解决。) O) j0 J+ n' t5 X! G2 f) `
|
|