DedeCMS不支持PHP5.3、5.4及以上版本后台白屏的解决方法

发布时间:2014年08月28日 / 分类:网络编程 / 1,268 次围观 / 抢沙发!

今天把PHP版本升级到了5.4,测试PHPinfo的时候一点问题都没有,但是登陆dede后台却显示500错误,

这应该怎么解决呢?百度了一下发现dede不支持PHP5.3、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, '/');


替换成


//@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, '/');



原文:http://blog.vipiu.cn/archives/2014/05/126.html

标签:网站建设, 网络推广

赞 (0) 本文链接: http://www.xiangguoqi.cn/read/1973.html [复制分享 ](转载时请保留 )



↑上一篇:QQ支持临时会话设置,2014最新设置方法
↓下一篇:有独立网站的,又多一个挣钱的渠道啦,看看或许是个机会 无觅关联推荐,快速提升流量
评论已关闭
热评文章
猜你喜欢
文章分类
最新文章
最近回复
    岁月痕迹