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

2017-04-08 01:49:47 5334

首先打开 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, ‘/’);


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: