Home> CMS Tutorial> DEDECMS> body text

What should I do if the background login interface is blank after installing dedecms?

王林
Release: 2021-01-29 14:02:48
forward
2876 people have browsed it

What should I do if the background login interface is blank after installing dedecms?

Foreword:

(Learning video sharing:Introduction to Programming)

php version: 5.4.4

What should I do if the background login interface is blank after installing dedecms?

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:

What should I do if the background login interface is blank after installing dedecms?

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;
Copy after login

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!

Related labels:
source:cnblogs.com
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!