今天把系统换成了windows server 2008 r2 同时将PHP环境提升至PHP5.7版本,测试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(),‘/’);
替换成
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’,‘/’);
上一篇:修改dede_tag标签的长度
下一篇:织梦dede5.7栏目列表首页与第一页重复的解决办法
总结以上是内存溢出为你收集整理的DedeCMS不支持PHP5.3、5.4及以上版本后台500错误白屏的解决方法全部内容,希望文章能够帮你解决DedeCMS不支持PHP5.3、5.4及以上版本后台500错误白屏的解决方法所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)