Ecmall automatically exits after logon. Solution

Source: Internet
Author: User

Some users report that they log out automatically after logon. After tracking and observation, they found that these users are all dynamic ip addresses, and the session in ecmall happens to be related to ip addresses. Therefore, they cannot find the user and fail to return to session 2, you need to log on again.

How can this problem be solved?

Modify the replicdes/libraries/session. lib. php method. This method is simple and rough. Just remove the ip address and determine it.

/*** Generate the session verification string ** @ author wj * @ param string $ session_id * @ return stirng */function gen_session_key ($ session_id) {static $ ip = ''; if ($ ip = ''){
// $ Ip = substr ($ this-> _ ip, 0, strrpos ($ this-> _ ip ,'.'));} Return sprintf ('% 08x', crc32 (! Empty ($ _ SERVER ['http _ USER_AGENT '])? $ _ SERVER ['http _ USER_AGENT ']. ROOT_PATH. $ ip. $ session_id: ROOT_PATH. $ ip. $ session_id ));}

Haha, the world is quiet!

Ecmall automatically exits after logon. Solution

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.