Memcache session sharing issue (Ubuntu)

Source: Internet
Author: User
Tags fpm memcached

memcache Session sharing problem Environment: three Ubuntu12.04.5 virtual machines, all installed php-FPM, and reuse the simple load-balancing U1 that was previously built (192.168.240.130) U2 (192.168.240.129) U3 (192.168.240.131currently only U3 has installed memcache;1) Ubuntu Installation php5-fpm and Memcachedsudo apt-get Install php5-fpm sudo apt-get install memcached (2) Nginx Configuration (refer to the previous load-balanced configuration, only add PHP support in the configuration) (3) Modify the/etc/php5/fpm/php.INI Configuration session. Save_handler =memcache Session. Save_path = "tcp://192.168.240.131:11211"; (Note: Here to fill in the installation of Memcache IP address, if it is this machine, also use the form of IP address, do not use 127.0.0.1)(5) Writing test filesSession_Start();Var_dump($_session); Issue: note memcache open mode (let other virtual function access) Resolved: memcached-U memcached-d-M 30-l 127.0.0.1-p 11211 replace the red part with an IP address 192.168.240.131problem: memcache restart/etc/init.d/memcached restarttelnet127.0.0.1 11211

Memcache session sharing issue (Ubuntu)

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.