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

这篇文章主要介绍了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, '/');

替换成

代码如下:

//@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错误白屏的解决方法
网页路径:http://hbruida.cn/article/gpojcd.html