原文来自:https://www.zixuephp.com
DEDECMS后台登陆后显示空白页解决办法——PHP5.4环境下
登陆DEDECMS后台输入用户名和密码后没有提示显示为空白,主要原因是php5.4的版本删除了session_register函数,打开文件include/userlogin.class.php在 function keepUser()内把如下代码:
- @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;
- //替换成
- $_SESSION[$this->keepUserIDTag]=$this->userID;
- $_SESSION[$this->keepUserTypeTag]=$this->userType;
- $_SESSION[$this->keepUserChannelTag]=$this->userChannel;
- $_SESSION[$this->keepUserNameTag]=$this->userName;
- $_SESSION[$this->keepUserPurviewTag]=$this->userPurview;
- $_SESSION[$this->keepAdminStyleTag]=$adminstyle;
即把每个包含@session_register的语句删除,即可以解决该问题,或者换成其他版本的php.