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

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

今天在倒腾织梦系统时,安装好之后发现后台无法登录,直接白屏,服务器是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, ‘/’);


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

最后编辑:admin 于 2016-09-09 14:38:08

关键字

版权声明

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

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

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

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

热门文章
近期留言

电脑没声音的求助者2019-11-12

这个回答得对,我也是通过你的方法操作,然后电脑就有声音了,高手高手啊

环氧地坪施工2019-10-23

了解了,哈哈哈,谢谢

安贝乐育婴网2019-10-12

讲得很清晰呢

repostone2019-10-10

博主怎么想到要关一个output呢。https://repostone.home.blog/

noOne2019-09-24

遇到同样的问题了……T.T 纠结了好久。。。