织梦园模板网专注于织梦企业模板、DeDe整站模板、织梦Html5模板等织梦模板的下载,提供DEDE织梦模板相关服务。织梦园织梦模板交流群
用户名:
密码:
注册
注册后享受折扣价

php5.4环境下DedeCMS登录退出后台空白的解决办法汇总

织梦园模板 / 2019-05-08 / 收藏
php5.4删除了session_unregister函数,导致织梦系统安全登录退出时,后台出现空白:看了一下安全退出的代码,就明白了:
function exitUser()  
{  
  ClearMyAddon();  
  @($this->keepUserIDTag);  
  @session_unregister($this->keepUserTypeTag);  
  @session_unregister($this->keepUserChannelTag);  
  @session_unregister($this->keepUserNameTag);  
  @session_unregister($this->keepUserPurviewTag);  
  DropCookie('dedeAdmindir');  
  DropCookie('DedeUserID');  
  DropCookie('DedeLoginTime');  
  $_SESSION = array();  
} 

由此可见 是php版本的问题,因我网站php版本5.4,php5.4删除了session_unregister该函数,而dedecms没有做相应调整,不支持***新版php。

解决办法1:
在include/userlogin.class.php中查找function keepUser(),大概在281行
把keepUser()函数下的@session_register();整段删除
 
解决方法2:
在include/userlogin.class.php 中声明一个函数
function session_register()
{
  return true;
}

相关织梦教程

收缩