您现在的位置是:首页 > 教程 > dedecms教程dedecms教程
dedecms修复不支持PHP5.3,5.4及以上版本后台500错误白屏
沛珊2023-09-28 15:19:33dedecms教程已有人查阅
导读今天把系统换成了windows server 2008 r2 同时将PHP环境提升至PHP5.5版本,测试PHPinfo的时候一点问题都没有,但是登陆dede后台却显示500错误,这应该怎么解决呢?
今天把系统换成了windows server 2008 r2 同时将PHP环境提升至PHP5.5版本,测试PHPinfo的时候一点问题都没有,但是登陆dede后台却显示500错误,这应该怎么解决呢?百度了一下发现dede不支持PHP5.3、PHP5.4及以上版本了,主要原为是php5.4的版本废除了session_register函数
可以采用如
首先打开 include/userlogin.class.php这个文件,在287行到308行原内容如下:
可以采用如
$_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织梦站点Linux高级安全策略设置教程
在Linux环境下搭建安装DedeCMS本篇不再具体说明,大家可以点击文档《Linux下安装DedeCMS及安全设置》来查看安装和基本安全配置部分的内容。 -
织梦dedecms图片怎么按月存放
采集文稿的图片总是按日存放,如何以年月存放?打开目录include里面的dedecollection.class.php -
织梦dedecms网站如何修改上一篇下一篇的标题字数
一般情况下,如果你的上一篇和下一篇是2行布局就不需要限制标题的字数了,如果你要一行布局上一篇和下一篇标题过长就会打乱网页布局,那么限制上一篇和下一篇的标题 -
织梦dedecms文章页面右侧边栏错位的原因和解决方法
DedeCMS,边栏错位,畅言DedeCMS默认模板的页面布局是两栏式的,一段时间以来,总会时不时的出现右侧边栏错位,本来应该在右边的边栏,莫名其妙的就跑
留言与评论 (共有 条评论) |