织梦(dedecms)后台登录白屏问题解决方案

2015-12-29 14:36:00
admin
原创
2289

今天在倒腾织梦系统时,安装好之后发现后台无法登录,直接白屏,服务器是Linux系统,起初以为是权限设置的问题,但之前都是正常的,即便全都设置777权限问题也依旧存在,后来百度了下,最终发现了解决方案:

原来DEDECMS不支持PHP5.4以上版本,主要原为是php5.4的版本废除了session_register函数 ,可以采用如$_SESSION[$this->keepUserIDTag] = $this->userID;要修改文件:

首先打开 include/userlogin.class.php这个文件,在287行到308行原内容如下:


@session_register($this->keepUserIDTag);
$_SESSION[$this->keepUserIDTag] = $this->userID;
@session_register($this->keepUserTypeTag);
$_SESSION[$this->keepUserTypeTag] = $this->userType;
@session_register($this->keepUserChannelTag);
$_SESSION[$this->keepUserChannelTag] = $this->userChannel;
@session_register($this->keepUserNameTag);
$_SESSION[$this->keepUserNameTag] = $this->userName;
@session_register($this->keepUserPurviewTag);
$_SESSION[$this->keepUserPurviewTag] = $this->userPurview;
@session_register($this->keepAdminStyleTag);
$_SESSION[$this->keepAdminStyleTag] = $adminstyle;
PutCookie(‘DedeUserID’, $this->userID, 3600 * 24, ‘/’);
PutCookie(‘DedeLoginTime’, time(), 3600 * 24, ‘/’);


替换成


if(empty($adminstyle)) $adminstyle = ‘dedecms’;
//@session_register($this->keepUserIDTag);
$_SESSION[$this->keepUserIDTag] = $this->keepUserIDTag;
$_SESSION[$this->keepUserIDTag] = $this->userID;
//@session_register($this->keepUserTypeTag);
$_SESSION[$this->keepUserTypeTag] = $this->keepUserTypeTag;
$_SESSION[$this->keepUserTypeTag] = $this->userType;
// @session_register($this->keepUserChannelTag);
$_SESSION[$this->keepUserChannelTag] = $this->keepUserChannelTag;
$_SESSION[$this->keepUserChannelTag] = $this->userChannel;
//@session_register($this->keepUserNameTag);
$_SESSION[$this->keepUserNameTag] = $this->keepUserNameTag;
$_SESSION[$this->keepUserNameTag] = $this->userName;
//@session_register($this->keepUserPurviewTag);
$_SESSION[$this->keepUserPurviewTag] = $this->keepUserPurviewTag;
$_SESSION[$this->keepUserPurviewTag] = $this->userPurview;
// @session_register($this->keepAdminStyleTag);
$_SESSION[$this->keepAdminStyleTag] = $this->keepAdminStyleTag;
$_SESSION[$this->keepAdminStyleTag] = $adminstyle;
PutCookie(‘DedeUserID’, $this->userID, 3600 * 24, ‘/’);
PutCookie(‘DedeLoginTime’, time(), 3600 * 24, ‘/’);


这是在登录后台,发现问题解决。。呵呵呵

版权声明

版权声明:本站原创文章,转载请注明作者和出处。

本站点采用 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议  

发表评论
评论通过审核后显示。
关注【程序员专区】

扫一扫,分享更多技术干货

热门文章
近期留言

前端博客 mybj123.com2020-06-03

写的不错,这回懂得了

test2020-05-18

谢谢

tbb2020-05-09

学到东西了,谢谢

前端小白2020-04-10

这是我见过讲解最好的,非常感谢您

BOB2020-04-01