CakePHP lost session when switching browser mode

Source: Internet
Author: User

Use the e-commerce system set up by cakephp to pay for the UnionPay payment using the interface. Recently found a problem in the test, the user selects the product to pay, after the successful payment click the "Back to the Merchant" button, the page returned after the user's login status is lost. After many tests, found that this problem only appears in the dual-core browser, the 360 browser as an example, the user in the selection of products, the default use of the browser's speed mode, but UnionPay when entering the bank Payment page, sometimes will be switched to IE compatibility mode, CakePHP's default settings check whether the user changes between requests, and the mode switches to let cakephp think the user has changed, causing the session to be lost.

The solution is to turn off CakePHP's settings for this check, the specific file is app\config under Core.php, the Session.checkagent is modified to false, the code is as follows:

false );

Blog statement:

All the articles in this blog, in addition to the title "reproduced" In the words, all the rest of the articles are my original or in the review of the information after the completion of the reference to non-reproduced articles please indicate this statement. --Blog Park-pallee

CakePHP lost session when switching browser mode

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.