Note: php5.4 removed the Session_unregister function _php tips

Source: Internet
Author: User
A few days ago installed the DEDECMS system, when the safe exit in the background, the background appears blank, previously only to analyze other functions to go, also did not pay attention to security, looked at the safe exit code, is written in this way:
Copy Code code as follows:

function Exituser ()
{
Clearmyaddon ();
@ ($this->keepuseridtag);
@session_unregister ($this->keepusertypetag);
@session_unregister ($this->keepuserchanneltag);
@session_unregister ($this->keepusernametag);
@session_unregister ($this->keepuserpurviewtag);
Dropcookie (' Dedeadmindir ');
Dropcookie (' Dedeuserid ');
Dropcookie (' Dedelogintime ');
$_session = Array ();
}

This just dawned on me, previously wrote a dede after the installation of the log in the background blank, then remember that the problem may be the PHP version, my PHP version is 5.4 version, checked out because of the new version of the problem, the original php5.4 version, deleted the Session_ Unregister this function, ya, dedecms also too not with the times, at least to support the latest PHP version of it, alas, I spent time to analyze. Backstage this function replaces the unset to be perfectly solved.

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.