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

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

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

站长说的很对,badao.net前来学习了!

C2019-08-01

总结的非常好,不过很可惜没有什么新形式的CMS出现,比如响应式设计,手机

giao2019-07-11

厉害

橘子园2019-04-29

网站挺不错的,以后想要学习服务器相关的知识可以来这逛逛,橘子园https://j

情感咨询2019-04-17

有用,感谢分享