Php5.4 webdream dedecms background login Blank
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: |
|
|
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: |
|
|
@ 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 ,'/'); |