Home >Backend Development >PHP Tutorial >Detailed explanation of the solution to the 500 error white screen in the backend of PHP5.3, 5.4 and above versions that DedeCMS does not support

Detailed explanation of the solution to the 500 error white screen in the backend of PHP5.3, 5.4 and above versions that DedeCMS does not support

黄舟
黄舟Original
2017-03-31 09:57:552618browse

This article mainly introduces the solution to the background 500 error white screen when DedeCMS does not support PHP5.3, 5.4 and above versions. Friends in need can refer to the

dedecms template download address. : www.php.cn/xiazai/code/dedecms

Today I changed the system to windows server 2008 r2 and upgraded the PHP environment to PHP5.5 version. There was no problem at all when testing PHPinfo, but when logging in Dede shows a 500 error in the background. How to solve this? Baidu found out that dede does not support PHP5.3, PHP5.4 and above. The main reason is that the version of php5.4 has been abolished. session_registerFunction
can be used For example, $_SESSION[$this->keepUserIDTag] = $this->userID;

The complete code is processed in this way as follows
First open the include/userlogin.class.php file, at line 287 The original content of line 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; 
Put
Cookie
(‘DedeUserID’, $this->userID, 3600 * 24, ‘/’); 
PutCookie(‘DedeLogin
Time
’, time(), 3600 * 24, ‘/’);

is replaced with

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 the detailed content of Detailed explanation of the solution to the 500 error white screen in the backend of PHP5.3, 5.4 and above versions that DedeCMS does not support. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn