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

热爱工作,投身事业,在这一过程中,抑制私心,陶冶人格,同时积累经验,提高能力。这样,才能获得周围人们的信任和尊敬。

今天把系统换成了windows server 2008 r2 同时将PHP环境提升至PHP5.5版本,测试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, ‘/’);

替换成

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, ‘/’);

以上就是DedeCMS不支持PHP5.3、5.4及以上版本后台500错误白屏的如何解决方法。承受,继续承受。性命的重量是压在肩头的种种过往和经历。性命的好处,是在你快要趴下的时候咬牙抗住。性命的精彩,是你负重前行,最终到达你梦里以前到过的地方。更多关于DedeCMS不支持PHP5.3、5.4及以上版本后台500错误白屏的如何解决方法请关注haodaima.com其它相关文章!

您可能有感兴趣的文章
dedecms5.7版本tag标签无效不支持大写字母怎么办

dedecms 专题列表页不支持[dede:fulltitle]标签的如何解决方法

DedeCMS子栏目调用currentstyle属性不支持typeid的如何解决方案

dedecms模板不支持PHP 函数file_exists

织梦channelartlist标签不支持currentstyle属性怎么办