php5.4 weaving dream dedecms Background login blank question _php Tutorial

Source: Internet
Author: User
A lot of friends like beginning something new will touch the server installed php5.4 version after the dedecms5.7 login after a white ah, like snow, the following we look at the dedecms background login blank problem method.

linux,php5.4, weaving dream 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 Copy Code

Put @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 pre-modification and modified code


Workaround: Find the include/userlogin.class.php file and look for the following:

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 (' Dedeuserid ', $this->userid, 3600 * 24, '/');
Putcookie (' Dedelogintime ', Time (), 3600 * 24, '/');

Replaced by

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 * 24, '/');

http://www.bkjia.com/PHPjc/633170.html www.bkjia.com true http://www.bkjia.com/PHPjc/633170.html techarticle a lot of friends like beginning something new will touch the server installed php5.4 version after the dedecms5.7 login after a white ah, like snow, oh, the following we look at Dedecms background login blank question ...

  • Related Article

    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.