This article mainly introduces how DedeCMS does not support white screen error 5.4 in PHP5.3, 500 and later versions, for more information about how DedeCMS does not support white screen error 5.4 in the backend of PHP5.3, 500, and later versions, see the following article.
Dedecms Template: www.php1.cn/xiazai/code/dedecms
Today, I switched the system to windows server 2008 r2 and upgraded the PHP environment to PHP5.5. No problem occurred when I tested PHPinfo, but the error 500 was displayed when I logged on to the dede background, how can this be solved? Baidu finds that dede does not support PHP5.3, PHP5.4, and later versions. The main reason is that php5.4 abolished the session_register function.
You can use $ _ SESSION [$ this-> keepUserIDTag] = $ this-> userID;
The complete code for processing this method is as follows:
First open the include/userlogin. class. php file. The original content from lines 287 to lines 308 is as follows:
The code is as follows:
@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, ‘/’);
Replace
The code is as follows:
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, ‘/’);
The above is a detailed explanation of DedeCMS's solution to the background 5.4 error white screen in PHP5.3, 500 and later versions. For more information, see other related articles in the first PHP community!