|
|
最近把论坛换到了新的服务器上,顺便升级到discuz x3.2最新版本。ucenter和uc_server后台就无法登录了。+ L# ]; H# d# f/ r9 b, J( r
开始以为是密码错误,上传tools工具修改密码之后还是不行,其实根本不是密码不对,就是最新版本的discuz出现的BUG导致我们无法登录。6 ~) Z: ~* a+ R2 s1 D" w* r
9 W3 L: h+ m5 h4 E9 ]
' x4 w5 w( M+ h* ^3 C3 Z8 r解决办法很简单/ b4 l) ~$ ]- L! e5 B$ J7 E
在/uc_server/model 中找到admin.php4 [/ e& a4 G( `! W
8 T# D- F: X: W/ j8 f& F
2 m, O) v4 `/ `; s* T
找到代码function adminbase() {
0 V( `( V# w3 M# M, Z) H; |% a' Q parent::__construct();, j" s3 N# ~" K9 k
$this->cookie_status = 0;$ p" X: g& u0 H/ ^
$sid = $this->cookie_status ? getgpc('sid', 'C') :rawurlencode(getgpc('sid', 'R'));7 J0 C; l/ M; i) n3 j0 ^, m
$this->sid = $this->view->sid = $this->sid_decode($sid) ? $sid : '';9 D/ W' U" {4 Z# s2 S- ~+ ?
' w0 S! R+ z9 O1 ~4 v7 h' `+ e
, W# l' T& m7 _7 L6 ]# w. o
7 E/ h! K0 }0 M& X
将红色部分修改9 o l A& s ?+ S7 D: A/ Z, `5 R
function adminbase() {7 m: Z! B+ n- C2 U. m3 T
parent::__construct();% R. d0 A& O4 C; n4 G! i( H+ [% d
$this->cookie_status = isset($_COOKIE['sid']) ? 1 : 0;- i: u/ y4 W$ |5 ^/ {) p/ y' @
$sid = $this->cookie_status ? getgpc('sid', 'C') :rawurlencode(getgpc('sid', 'R'));2 ^& B+ x$ c- S2 b3 U; P
$this->sid = $this->view->sid = $this->sid_decode($sid) ? $sid : '';
* e Y9 l9 F3 D. p6 ?3 u. w7 K' ^8 x% b问题解决。$ m- |, w; e6 n4 M# c) O
|
|