linux,php5.4, dream weaving dedecms background login blank, Reason:
Include/userlogin.class.php, which has a keepuser () function, is to register a session variable with Session_register, but this function has been removed from the php5.4
| The code is as follows |
|
|
The @session_register ($this->keepuseridtag); Comment out, and then change to
if (!isset ($_session[$this->keepuseridtag]))
As follows:
if (!isset ($_session[$this->keepuseridtag]))
@session_register ($this->keepuseridtag); |
My changes before and after the modified code
Workaround: Find the include/userlogin.class.php file and look for the following:
| 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 into
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 (' Dedeuserid ', $this->userid, 3600 * 24, '/');
Putcookie (' Dedelogintime ', Time (), 3600 *, '/');
|