DedeCMS does not support white screen solution for background 5.4 error of PHP5.3, 500 and later versions

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.