Php5.4 webdream dedecms background login blank question

Source: Internet
Author: User

A lot of new users will touch the White Paper behind dedecms5.7 login after installing php5.4 on the server. It's just like snow. Let's look at the solution to the blank background login problem of dedecms.

Linux, php5.4, and zhimeng dedecms background login blank, reason:

Include/userlogin. class. php, which contains a keepuser () function, is used to register a session variable with session_register, but this function has been removed in php5.4

The Code is as follows: Copy code

Comment out @ session_register ($ this-> keepUserIDTag), and change it
If (! Isset ($ _ SESSION [$ this-> keepUserIDTag])

As follows:
If (! Isset ($ _ SESSION [$ this-> keepUserIDTag])
// @ Session_register ($ this-> keepUserIDTag );

My pre-modification and post-modification code


Solution: Open the include/userlogin. class. php file and find the following content:

The Code is as follows: Copy code

@ 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 ('deuserid', $ this-> userID, 3600*24 ,'/');
PutCookie ('delogintime', time (), 3600*24 ,'/');

Replace

Global $ admincachefile, $ adminstyle;
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 ('deuserid', $ this-> userID, 3600*24 ,'/');
PutCookie ('delogintime', time (), 3600*24 ,'/');

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.