Foreword:
(Learning video sharing:Introduction to Programming)
php version: 5.4.4
Everything went smoothly during the installation. When logging in to the backend, a blank page was displayed after filling in the username and password. Solution:
Find include/userlogin.class .php, which contains a keepuser() function, which uses session_register to register a session variable. However, this function has been removed in php5.4. See the official website introduction:
If you use this php version, there will definitely be an error, but we can modify the code:
Comment out @session_register($this->keepUserIDTag); and then change it to
if ( !isset($_SESSION[$this->keepUserIDTag]))
There are six in total, all changed to the following:
1 if (!isset($_SESSION[$this->keepUserIDTag])) 2 //@session_register($this->keepUserIDTag); 3 $_SESSION[$this->keepUserIDTag] = $this->userID; 4 5 if (!isset($_SESSION[$this->keepUserTypeTag])) 6 //@session_register($this->keepUserTypeTag); 7 $_SESSION[$this->keepUserTypeTag] = $this->userType; 8 9 if (!isset($_SESSION[$this->keepUserChannelTag])) 10 //@session_register($this->keepUserChannelTag); 11 $_SESSION[$this->keepUserChannelTag] = $this->userChannel; 12 13 if (!isset($_SESSION[$this->keepUserNameTag])) 14 //@session_register($this->keepUserNameTag); 15 $_SESSION[$this->keepUserNameTag] = $this->userName; 16 17 if (!isset($_SESSION[$this->keepUserPurviewTag])) 18 //@session_register($this->keepUserPurviewTag); 19 $_SESSION[$this->keepUserPurviewTag] = $this->userPurview; 20 21 if (!isset($_SESSION[$this->keepAdminStyleTag])) 22 //@session_register($this->keepAdminStyleTag); 23 $_SESSION[$this->keepAdminStyleTag] = $adminstyle;
Re-enter the background and log in, you can jump to the normal Manage the page.
PS: I have been struggling with this problem of blank login background for a long time, but I still can’t find a solution because I am not familiar with PHP. It is generally said on the Internet that it is a problem with the encoding of the data/common.inc.php file. , the encoding needs to be changed to a BOM-free format file to save, but it is not said to be a problem with php5.4. The most important thing is that the official website of DreamWeaver has not explained it, and some people have asked this question on the official website forum but there is no answer. It is frustrating. ! But now it's finally solved.
Related recommendations:dedecms tutorial
The above is the detailed content of What should I do if the background login interface is blank after installing dedecms?. For more information, please follow other related articles on the PHP Chinese website!